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

docs: Update clang-format instructions in CONTRIBUTING. #1053

Merged
merged 9 commits into from
Aug 30, 2020
Merged

docs: Update clang-format instructions in CONTRIBUTING. #1053

merged 9 commits into from
Aug 30, 2020

Conversation

fhlasek
Copy link
Contributor

@fhlasek fhlasek commented Aug 27, 2020

Description of Change

Aligning the instructions in CONTRIBUTING.md to use the pre-defined style from .clang-format instroduced by #1052.

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:

@kvedala
Copy link
Collaborator

kvedala commented Aug 27, 2020

👍 Thank you @fhlasek

Can you update these facts as well:

  • We moved away from using cpplint as the static code analyzer to clang-tidy.
    • The configuration settings for it are in the file .clang-tidy.
    • The command sequence to invoke it is:
      1. Export build commands using cmake. The configuration creates a compile-commands.json in the build folder.
        cmake -B build -S .
      2. Invoke clang-tidy
        clang-tidy --fix --quiet -p build subfolder/file_to_check.cpp --
  • Enable GitHub Actions on their respective folders
  • GitHub Actions will execute clang-tidy and clang-format after every a push (not a commit). The result can create another commit if the actions made any changes on the author's behalf. Hence, it is better to wait and check the results of GitHub Actions after every push. If there were, better to call the command git pull to ensure the local codebase is synchronized with that on GitHub.

Let know if you need any further details.

@kvedala kvedala added the Improvement improvement in previously written codes label Aug 27, 2020
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
@kvedala kvedala merged commit 072fc95 into TheAlgorithms:master Aug 30, 2020
@Panquesito7 Panquesito7 added the approved Approved; waiting for merge label Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Approved; waiting for merge Improvement improvement in previously written codes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants