有代码风格执行器吗? [英] Is there a code style enforcer?

查看:166
本文介绍了有代码风格执行器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PHP编写的网站,以及许多其他程序员,有时我必须处理真正可怕的代码。

I'm working with websites written in PHP, along with many other programmers, and sometimes I have to deal with really awful code.

缩进完全搞砸了,卷曲大括号在错误的地方,可怕的空格使用,它真的伤害我的眼睛,实际上使我的工作更加艰苦,需要更长时间。

Indentation totally messed up, curly braces in the wrong places, terrible whitespace use, it really hurts my eyes and actually makes my work harder and take longer.

有一个工具,编码风格,然后将其应用于文件?
我确定在不同的IDE中必须有这样的函数,但是我需要一个独立的工具,因为我使用Notepad ++等简单的记事本编写代码。 (如果它是Notepad ++中的一个函数,我没有看到它)

Is there a tool where you can specify your coding style and then it applies it to files? I'm sure there must be such functions in different IDEs, but I need an independent tool as I code with simple notepads like Notepad++ or the like. ( if it's such a function in Notepad++, I didn't see it )

推荐答案

(幸运?)不要使用任何其他代码太多,谷歌发现这一点, PHP美化

While I have never used any, as I (luckly?) don't use anyone else code much, google found this, PHP Beautifier.

EDIT

请参阅,其建议 PHP Code Beautifier ,它是免费的(但需要创建帐户)

EDIT
See this question which recommends PHP Code Beautifier which is free (but requires an account creation)

这篇关于有代码风格执行器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆