Open main menu
Home
Random
Log in
Settings
About Sugar Labs
Disclaimers
Sugar Labs
Search
Changes
← Older edit
Newer edit →
Platform Team/Sugar Lint
(view source)
Revision as of 17:25, 14 July 2010
294 bytes added
,
17:25, 14 July 2010
no edit summary
Line 20:
Line 20:
echo PATH=''<local-path>'':$PATH >> ~/.bashrc
echo PATH=''<local-path>'':$PATH >> ~/.bashrc
−
== Direct
usage
==
+
== Usage ==
+
+
=
== Direct
invocation =
==
To lint files:
To lint files:
Line 34:
Line 36:
sugar-lint -d ''<file>''
sugar-lint -d ''<file>''
−
== Lint files before commiting ==
+
=
== Lint files before commiting
=
==
To add pre-commit git hook to lint files before commiting to arbitrary project:
To add pre-commit git hook to lint files before commiting to arbitrary project:
ln -s ''<local-path>''/sugar/lint/git-pre-commit-hook ''<project-root>''/.git/hooks/pre-commit
ln -s ''<local-path>''/sugar/lint/git-pre-commit-hook ''<project-root>''/.git/hooks/pre-commit
+
+
== Additional syntax ==
+
+
Various sugar-lint related hints that could be used in source files.
+
+
=== Disable sugar-lint ===
+
+
To disable checks entirely for source file.
+
+
Python syntax:
+
# sugar-lint: disable
+
+
Vala syntax:
+
// sugar-lint: disable
+
/* sugar-lint: disable */
== Resources ==
== Resources ==
* [http://git.sugarlabs.org/projects/sugar-lint sources]
* [http://git.sugarlabs.org/projects/sugar-lint sources]
Alsroot
Bots
,
Bureaucrats
,
Check users
,
Administrators
,
Widget editors
5,705
edits