Commit Graph

10 Commits

Author SHA1 Message Date
John Beard a7270f8c1c Formatting: prefer a Git config variable to env var
The keeps all the formatting config together in the Git ecosystem
and keeps the config on a per-repo basis, unless the user explicitly
sets it --global.

Keep the old env var behaviour for now for backwards compatibility.
2019-03-29 15:06:48 +00:00
John Beard a69cdf1793 Formatting: exclude generated files from git formatting hook
Add a .gitattributes files to provide a place to store file
attributes. Add a custom attribute for files that should be under
KiCad style guidelines.

Exclude generated files from the style enforcement. So far:

* bitmap .cpp files
* wxFormBuilder base classes
* Lemon grammars

It's now trivial to add the 'generated' attribute to any such
file.

Putting this into .gitattributes also means it can be retreived
programmatically, by other scripts, git alaises or on the command
line.

Use the attributes to provide a utility script to show or apply
formatting to controlled files (plain git clang-format won't
pick up our custom git attributes). Add details for the script in
the dev docs.

Also modiify the check-format hook to follow the .gitattributes
and only apply to cached (staged for commit) changes. Then you
won't be stopped committing because of bad formatting in unstaged
changed, or uncontrolled files.

Concept and some aspects of the implementation inspired by
CMake commit d5f39a56 [1].

[1]: d5f39a56a4

tool
2019-03-29 15:06:48 +00:00
Wayne Stambaugh 7e34a5a106 Fix broken table of contents link in coding policy. 2019-03-15 15:47:09 -04:00
John Beard 2f5dd6a43a Docs: Fix doxygen links
Doxygen is now at: http://www.doxygen.nl

Reported by: Brian Piccioni.
2019-01-02 09:53:29 -05:00
John Beard 409e884ce6 Add git format commit hook
This adds a pre-commit hook to warn of any style errors.

Also adds a 'hook-chain' script to simplify future hooks.

Add dev-doc note about how to use the formatter.
2018-10-29 10:47:51 -04:00
Wayne Stambaugh dab73e172b Doxygen warning fixes and coding policy comment changes. 2017-06-16 10:08:28 -04:00
Kristoffer Ödmark 19d5cc7548 Removed all exception specifiers since deprecated.
Exception specifiers are deprecated in cpp11, so went through them all
and removed them from the code.
2017-06-12 13:54:55 -04:00
Kristoffer Ödmark 8590a22995 Cpp11 compability steps.
-Changed coding style to not have exception specifications.
-Changed autogenerated Lexer code to not have exception specifications.
2017-06-12 11:47:20 -04:00
Wayne Stambaugh 0b6147ed05 Minor developer's documentation fixes.
Fix duplicate table of content links.

Fix heading level issues in version 6 road map.

Add new Python action menu options to compiling document.
2017-01-24 10:14:27 -05:00
Nick Østergaard 96138e1237 Convert coding policy document from odt to markdown for inclusion in developer's documentation. 2015-01-16 13:57:16 -05:00