Branch: refs/heads/master
Author: Colomban Wendling <lists.ban(a)herbesfolles.org>
Committer: Colomban Wendling <lists.ban(a)herbesfolles.org>
Date: Sat, 29 Nov 2014 21:48:01 UTC
Commit: 173c09eab2afcd9549b75cd779bedca54fc9f718
https://github.com/geany/geany/commit/173c09eab2afcd9549b75cd779bedca54fc9f…
Log Message:
-----------
Merge pull request #302 from kernc/common_linters
Common linters by default in the Build menu
Modified Paths:
--------------
data/filetypes.c
data/filetypes.cpp
data/filetypes.haskell
data/filetypes.javascript
data/filetypes.python
data/filetypes.ruby
data/filetypes.sh
data/filetypes.xml
doc/geany.txt
Modified: data/filetypes.c
19 lines changed, 13 insertions(+), 6 deletions(-)
===================================================================
@@ -78,12 +78,19 @@ context_action_cmd=
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=1
-[build_settings]
+[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)
-compiler=gcc -Wall -c "%f"
-linker=gcc -Wall -o "%e" "%f"
-run_cmd="./%e"
-
-
+FT_00_LB=_Compile
+FT_00_CM=gcc -Wall -c "%f"
+FT_00_WD=
+FT_01_LB=_Build
+FT_01_CM=gcc -Wall -o "%e" "%f"
+FT_01_WD=
+FT_02_LB=_Lint
+FT_02_CM=cppcheck --language=c --enable=warning,style --template=gcc "%f"
+FT_02_WD=
+EX_00_LB=_Execute
+EX_00_CM="./%e"
+EX_00_WD=
Modified: data/filetypes.cpp
18 lines changed, 13 insertions(+), 5 deletions(-)
===================================================================
@@ -50,11 +50,19 @@ context_action_cmd=
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=1
-[build_settings]
+[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)
-compiler=g++ -Wall -c "%f"
-linker=g++ -Wall -o "%e" "%f"
-run_cmd="./%e"
-
+FT_00_LB=_Compile
+FT_00_CM=g++ -Wall -c "%f"
+FT_00_WD=
+FT_01_LB=_Build
+FT_01_CM=g++ -Wall -o "%e" "%f"
+FT_01_WD=
+FT_02_LB=_Lint
+FT_02_CM=cppcheck --language=c++ --enable=warning,style --template=gcc "%f"
+FT_02_WD=
+EX_00_LB=_Execute
+EX_00_CM="./%e"
+EX_00_WD=
Modified: data/filetypes.haskell
13 lines changed, 10 insertions(+), 3 deletions(-)
===================================================================
@@ -72,9 +72,16 @@ context_action_cmd=
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=1
-[build_settings]
+[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)
-compiler=ghc --make "%f"
-run_cmd="./%e"
+FT_00_LB=_Compile
+FT_00_CM=ghc --make "%f"
+FT_00_WD=
+FT_02_LB=_Lint
+FT_02_CM=hlint "%f"
+FT_02_WD=
+EX_00_LB=_Execute
+EX_00_CM="./%e"
+EX_00_WD=
Modified: data/filetypes.javascript
10 lines changed, 5 insertions(+), 5 deletions(-)
===================================================================
@@ -38,11 +38,11 @@ context_action_cmd=
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=1
-[build_settings]
+[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)
-compiler=
-run=
-
-
+FT_02_LB=_Lint
+FT_02_CM=jshint "%f"
+FT_02_WD=
+error_regex=([^:]+): line ([0-9]+), col ([0-9]+)
Modified: data/filetypes.python
14 lines changed, 11 insertions(+), 3 deletions(-)
===================================================================
@@ -61,9 +61,17 @@ context_action_cmd=
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=0
-[build_settings]
+[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)
-compiler=python -m py_compile "%f"
-run_cmd=python "%f"
+FT_00_LB=_Compile
+FT_00_CM=python -m py_compile "%f"
+FT_00_WD=
+FT_02_LB=_Lint
+FT_02_CM=pep8 --max-line-length=80 "%f"
+FT_02_WD=
+error_regex=(.+):([0-9]+):([0-9]+)
+EX_00_LB=_Execute
+EX_00_CM=python "%f"
+EX_00_WD=
Modified: data/filetypes.ruby
10 lines changed, 7 insertions(+), 3 deletions(-)
===================================================================
@@ -73,9 +73,13 @@ context_action_cmd=
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=1
-[build_settings]
+[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)
-compiler=ruby -c "%f"
-run_cmd=ruby "%f"
+FT_00_LB=_Compile
+FT_00_CM=ruby -wc "%f"
+FT_00_WD=
+EX_00_LB=_Execute
+EX_00_CM=ruby "%f"
+EX_00_WD=
Modified: data/filetypes.sh
9 lines changed, 7 insertions(+), 2 deletions(-)
===================================================================
@@ -52,8 +52,13 @@ context_action_cmd=
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=1
-[build_settings]
+[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)
-run_cmd="./%f"
+FT_02_LB=_Lint
+FT_02_CM=shellcheck --format=gcc "%f"
+FT_02_WD=
+EX_00_LB=_Execute
+EX_00_CM="./%f"
+EX_00_WD=
Modified: data/filetypes.xml
9 lines changed, 9 insertions(+), 0 deletions(-)
===================================================================
@@ -38,3 +38,12 @@ xml_indent_tags=true
#width=4
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#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]+):
Modified: doc/geany.txt
15 lines changed, 15 insertions(+), 0 deletions(-)
===================================================================
@@ -2886,6 +2886,7 @@ the following items:
* Compile
* Build
+* Lint
* Make All
* Make Custom Target
* 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
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
````
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Kernc <kerncece(a)gmail.com>
Committer: Kernc <kerncece(a)gmail.com>
Date: Fri, 28 Nov 2014 08:09:41 UTC
Commit: 961ccf38c5a50fbdfa9eea0ca481ac8a3a04f694
https://github.com/geany/geany/commit/961ccf38c5a50fbdfa9eea0ca481ac8a3a04f…
Log Message:
-----------
Migrated some old-style build_settings to new-style build-menu
Modified Paths:
--------------
data/filetypes.c
data/filetypes.cpp
data/filetypes.haskell
data/filetypes.python
data/filetypes.ruby
data/filetypes.sh
Modified: data/filetypes.c
17 lines changed, 9 insertions(+), 8 deletions(-)
===================================================================
@@ -78,18 +78,19 @@ context_action_cmd=
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=1
-[build_settings]
-# %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)
-compiler=gcc -Wall -c "%f"
-linker=gcc -Wall -o "%e" "%f"
-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_00_LB=_Compile
+FT_00_CM=gcc -Wall -c "%f"
+FT_00_WD=
+FT_01_LB=_Build
+FT_01_CM=gcc -Wall -o "%e" "%f"
+FT_01_WD=
FT_02_LB=_Lint
FT_02_CM=cppcheck --language=c --enable=warning,style --template=gcc "%f"
FT_02_WD=
+EX_00_LB=_Execute
+EX_00_CM="./%e"
+EX_00_WD=
Modified: data/filetypes.cpp
17 lines changed, 9 insertions(+), 8 deletions(-)
===================================================================
@@ -50,18 +50,19 @@ context_action_cmd=
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=1
-[build_settings]
-# %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)
-compiler=g++ -Wall -c "%f"
-linker=g++ -Wall -o "%e" "%f"
-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_00_LB=_Compile
+FT_00_CM=g++ -Wall -c "%f"
+FT_00_WD=
+FT_01_LB=_Build
+FT_01_CM=g++ -Wall -o "%e" "%f"
+FT_01_WD=
FT_02_LB=_Lint
FT_02_CM=cppcheck --language=c++ --enable=warning,style --template=gcc "%f"
FT_02_WD=
+EX_00_LB=_Execute
+EX_00_CM="./%e"
+EX_00_WD=
Modified: data/filetypes.haskell
13 lines changed, 6 insertions(+), 7 deletions(-)
===================================================================
@@ -72,17 +72,16 @@ context_action_cmd=
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=1
-[build_settings]
-# %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)
-compiler=ghc --make "%f"
-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_00_LB=_Compile
+FT_00_CM=ghc --make "%f"
+FT_00_WD=
FT_02_LB=_Lint
FT_02_CM=hlint "%f"
FT_02_WD=
+EX_00_LB=_Execute
+EX_00_CM="./%e"
+EX_00_WD=
Modified: data/filetypes.python
13 lines changed, 6 insertions(+), 7 deletions(-)
===================================================================
@@ -61,18 +61,17 @@ context_action_cmd=
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=0
-[build_settings]
-# %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)
-compiler=python -m py_compile "%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_00_LB=_Compile
+FT_00_CM=python -m py_compile "%f"
+FT_00_WD=
FT_02_LB=_Lint
FT_02_CM=pep8 --max-line-length=80 "%f"
FT_02_WD=
error_regex=(.+):([0-9]+):([0-9]+)
+EX_00_LB=_Execute
+EX_00_CM=python "%f"
+EX_00_WD=
Modified: data/filetypes.ruby
10 lines changed, 7 insertions(+), 3 deletions(-)
===================================================================
@@ -73,9 +73,13 @@ context_action_cmd=
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=1
-[build_settings]
+[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)
-compiler=ruby -c "%f"
-run_cmd=ruby "%f"
+FT_00_LB=_Compile
+FT_00_CM=ruby -wc "%f"
+FT_00_WD=
+EX_00_LB=_Execute
+EX_00_CM=ruby "%f"
+EX_00_WD=
Modified: data/filetypes.sh
9 lines changed, 3 insertions(+), 6 deletions(-)
===================================================================
@@ -52,12 +52,6 @@ context_action_cmd=
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=1
-[build_settings]
-# %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)
-run_cmd="./%f"
-
[build-menu]
# %f will be replaced by the complete filename
# %e will be replaced by the filename without extension
@@ -65,3 +59,6 @@ run_cmd="./%f"
FT_02_LB=_Lint
FT_02_CM=shellcheck --format=gcc "%f"
FT_02_WD=
+EX_00_LB=_Execute
+EX_00_CM="./%f"
+EX_00_WD=
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Kernc <kerncece(a)gmail.com>
Committer: Kernc <kerncece(a)gmail.com>
Date: Fri, 28 Nov 2014 08:08:38 UTC
Commit: 7a0285eef857bf99361eedae3cfe125254b99f4c
https://github.com/geany/geany/commit/7a0285eef857bf99361eedae3cfe125254b99…
Log Message:
-----------
Added some default common linters in the Build menu
Modified Paths:
--------------
data/filetypes.c
data/filetypes.cpp
data/filetypes.haskell
data/filetypes.javascript
data/filetypes.python
data/filetypes.sh
data/filetypes.xml
doc/geany.txt
Modified: data/filetypes.c
8 lines changed, 7 insertions(+), 1 deletions(-)
===================================================================
@@ -86,4 +86,10 @@ compiler=gcc -Wall -c "%f"
linker=gcc -Wall -o "%e" "%f"
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=
Modified: data/filetypes.cpp
7 lines changed, 7 insertions(+), 0 deletions(-)
===================================================================
@@ -58,3 +58,10 @@ compiler=g++ -Wall -c "%f"
linker=g++ -Wall -o "%e" "%f"
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=
Modified: data/filetypes.haskell
8 lines changed, 8 insertions(+), 0 deletions(-)
===================================================================
@@ -78,3 +78,11 @@ context_action_cmd=
# (use only one of it at one time)
compiler=ghc --make "%f"
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=
Modified: data/filetypes.javascript
10 lines changed, 5 insertions(+), 5 deletions(-)
===================================================================
@@ -38,11 +38,11 @@ context_action_cmd=
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=1
-[build_settings]
+[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)
-compiler=
-run=
-
-
+FT_02_LB=_Lint
+FT_02_CM=jshint "%f"
+FT_02_WD=
+error_regex=([^:]+): line ([0-9]+), col ([0-9]+)
Modified: data/filetypes.python
9 lines changed, 9 insertions(+), 0 deletions(-)
===================================================================
@@ -67,3 +67,12 @@ context_action_cmd=
# (use only one of it at one time)
compiler=python -m py_compile "%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]+)
Modified: data/filetypes.sh
8 lines changed, 8 insertions(+), 0 deletions(-)
===================================================================
@@ -57,3 +57,11 @@ context_action_cmd=
# %e will be replaced by the filename without extension
# (use only one of it at one time)
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=
Modified: data/filetypes.xml
9 lines changed, 9 insertions(+), 0 deletions(-)
===================================================================
@@ -38,3 +38,12 @@ xml_indent_tags=true
#width=4
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#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]+):
Modified: doc/geany.txt
15 lines changed, 15 insertions(+), 0 deletions(-)
===================================================================
@@ -2886,6 +2886,7 @@ the following items:
* Compile
* Build
+* Lint
* Make All
* Make Custom Target
* 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
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
````
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).