Added some default common linters in the Build menu
This commit is contained in:
parent
e6b74d9d85
commit
7a0285eef8
@ -86,4 +86,10 @@ compiler=gcc -Wall -c "%f"
|
|||||||
linker=gcc -Wall -o "%e" "%f"
|
linker=gcc -Wall -o "%e" "%f"
|
||||||
run_cmd="./%e"
|
run_cmd="./%e"
|
||||||
|
|
||||||
|
[build-menu]
|
||||||
|
# %f will be replaced by the complete filename
|
||||||
|
# %e will be replaced by the filename without extension
|
||||||
|
# (use only one of it at one time)
|
||||||
|
FT_02_LB=_Lint
|
||||||
|
FT_02_CM=cppcheck --language=c --enable=warning,style --template=gcc "%f"
|
||||||
|
FT_02_WD=
|
||||||
|
@ -58,3 +58,10 @@ compiler=g++ -Wall -c "%f"
|
|||||||
linker=g++ -Wall -o "%e" "%f"
|
linker=g++ -Wall -o "%e" "%f"
|
||||||
run_cmd="./%e"
|
run_cmd="./%e"
|
||||||
|
|
||||||
|
[build-menu]
|
||||||
|
# %f will be replaced by the complete filename
|
||||||
|
# %e will be replaced by the filename without extension
|
||||||
|
# (use only one of it at one time)
|
||||||
|
FT_02_LB=_Lint
|
||||||
|
FT_02_CM=cppcheck --language=c++ --enable=warning,style --template=gcc "%f"
|
||||||
|
FT_02_WD=
|
||||||
|
@ -78,3 +78,11 @@ context_action_cmd=
|
|||||||
# (use only one of it at one time)
|
# (use only one of it at one time)
|
||||||
compiler=ghc --make "%f"
|
compiler=ghc --make "%f"
|
||||||
run_cmd="./%e"
|
run_cmd="./%e"
|
||||||
|
|
||||||
|
[build-menu]
|
||||||
|
# %f will be replaced by the complete filename
|
||||||
|
# %e will be replaced by the filename without extension
|
||||||
|
# (use only one of it at one time)
|
||||||
|
FT_02_LB=_Lint
|
||||||
|
FT_02_CM=hlint "%f"
|
||||||
|
FT_02_WD=
|
||||||
|
@ -38,11 +38,11 @@ context_action_cmd=
|
|||||||
# 0 is spaces, 1 is tabs, 2 is tab & spaces
|
# 0 is spaces, 1 is tabs, 2 is tab & spaces
|
||||||
#type=1
|
#type=1
|
||||||
|
|
||||||
[build_settings]
|
[build-menu]
|
||||||
# %f will be replaced by the complete filename
|
# %f will be replaced by the complete filename
|
||||||
# %e will be replaced by the filename without extension
|
# %e will be replaced by the filename without extension
|
||||||
# (use only one of it at one time)
|
# (use only one of it at one time)
|
||||||
compiler=
|
FT_02_LB=_Lint
|
||||||
run=
|
FT_02_CM=jshint "%f"
|
||||||
|
FT_02_WD=
|
||||||
|
error_regex=([^:]+): line ([0-9]+), col ([0-9]+)
|
||||||
|
@ -67,3 +67,12 @@ context_action_cmd=
|
|||||||
# (use only one of it at one time)
|
# (use only one of it at one time)
|
||||||
compiler=python -m py_compile "%f"
|
compiler=python -m py_compile "%f"
|
||||||
run_cmd=python "%f"
|
run_cmd=python "%f"
|
||||||
|
|
||||||
|
[build-menu]
|
||||||
|
# %f will be replaced by the complete filename
|
||||||
|
# %e will be replaced by the filename without extension
|
||||||
|
# (use only one of it at one time)
|
||||||
|
FT_02_LB=_Lint
|
||||||
|
FT_02_CM=pep8 --max-line-length=80 "%f"
|
||||||
|
FT_02_WD=
|
||||||
|
error_regex=(.+):([0-9]+):([0-9]+)
|
||||||
|
@ -57,3 +57,11 @@ context_action_cmd=
|
|||||||
# %e will be replaced by the filename without extension
|
# %e will be replaced by the filename without extension
|
||||||
# (use only one of it at one time)
|
# (use only one of it at one time)
|
||||||
run_cmd="./%f"
|
run_cmd="./%f"
|
||||||
|
|
||||||
|
[build-menu]
|
||||||
|
# %f will be replaced by the complete filename
|
||||||
|
# %e will be replaced by the filename without extension
|
||||||
|
# (use only one of it at one time)
|
||||||
|
FT_02_LB=_Lint
|
||||||
|
FT_02_CM=shellcheck --format=gcc "%f"
|
||||||
|
FT_02_WD=
|
||||||
|
@ -38,3 +38,12 @@ xml_indent_tags=true
|
|||||||
#width=4
|
#width=4
|
||||||
# 0 is spaces, 1 is tabs, 2 is tab & spaces
|
# 0 is spaces, 1 is tabs, 2 is tab & spaces
|
||||||
#type=1
|
#type=1
|
||||||
|
|
||||||
|
[build-menu]
|
||||||
|
# %f will be replaced by the complete filename
|
||||||
|
# %e will be replaced by the filename without extension
|
||||||
|
# (use only one of it at one time)
|
||||||
|
FT_02_LB=_Lint
|
||||||
|
FT_02_CM=xmllint --noout "%f"
|
||||||
|
FT_02_WD=
|
||||||
|
error_regex=(.+):([0-9]+):
|
||||||
|
@ -2886,6 +2886,7 @@ the following items:
|
|||||||
|
|
||||||
* Compile
|
* Compile
|
||||||
* Build
|
* Build
|
||||||
|
* Lint
|
||||||
* Make All
|
* Make All
|
||||||
* Make Custom Target
|
* Make Custom Target
|
||||||
* Make Object
|
* Make Object
|
||||||
@ -2925,6 +2926,20 @@ Interpreted languages do not use the Build command.
|
|||||||
commands is recommended; this will also make it easier for users to
|
commands is recommended; this will also make it easier for users to
|
||||||
build your software.
|
build your software.
|
||||||
|
|
||||||
|
Lint
|
||||||
|
````
|
||||||
|
|
||||||
|
Source code linters are often used to find code that doesn't correspond to
|
||||||
|
certain style guidelines: non-portable code, common or hard to find
|
||||||
|
errors, code "smells", variables used before being set, unused functions,
|
||||||
|
division by zero, constant conditions, etc. Linters inspect the code and
|
||||||
|
issue warnings much like the compilers do. This is formally referred to as
|
||||||
|
static code analysis.
|
||||||
|
|
||||||
|
Some common linters are pre-configured for you in the Build menu (``pep8``
|
||||||
|
for Python, ``cppcheck`` for C/C++, JSHint for JavaScript, ``xmllint`` for
|
||||||
|
XML, ``hlint`` for Haskell, ``shellcheck`` for shell code, ...), but all
|
||||||
|
these are standalone tools you need to obtain before using.
|
||||||
|
|
||||||
Make
|
Make
|
||||||
````
|
````
|
||||||
|
Loading…
x
Reference in New Issue
Block a user