Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Tools for reformatting code. (GIT8266O-364) #204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trygvis
Copy link
Contributor

@trygvis trygvis commented Jun 2, 2018

Hi

It would be if this project had a more consistent code style. I suggest using clang-format, it seems to be quite flexible, maintained, well documented and popular in other big projects. I've added a .clang-format file that is quite close to the current style (but the current style is a bit all over the place).

I've made a small tool that will replace tabs with 4 spaces and run clang-format on the source code. File patterns are configurable with a gitignore style file.

The commit message contains more information, but the also see README.md.

This is an improved version of #194 where 1) it uses format.sh from esp-idf and astyle instead of clang-format and 2) find-files is renamed to tag-files and more generic.

This adds two tools: tools/code-style and tools/tag-files. The first is
the main tool to be used by developers, the second is a utility used by
the first.

tools/code-style can replace tabs with spaces and run astyle.

tools/tag-files will list files and tag each file accoring to the
configuration file. The file patterns are configured in
tools/code-style.ini

README.md is updated with some information on the code style and how to
run the reformat tool.

This adds two tools: tools/code-style and tools/tag-files. The first is
the main tool to be used by developers, the second is a utility used by
the first.

`tools/code-style` can replace tabs with spaces and run astyle.

`tools/tag-files` will list files and tag each file accoring to the
configuration file. The file patterns are configured in
`tools/code-style.ini`

README.md is updated with some information on the code style and how to
run the reformat tool.
@trygvis
Copy link
Contributor Author

trygvis commented Jun 3, 2018

Rebased on top of master.

@wujiangang Is this kind of changes something that you will accept? I'm happy to make changes if Espressif have some comments.

@github-actions github-actions bot changed the title fix: Tools for reformatting code. fix: Tools for reformatting code. (GIT8266O-364) Jan 2, 2020
@CLAassistant
Copy link

CLAassistant commented Jun 12, 2020

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants