Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[MXNET-859] Add a clang-tidy stage to CI #12282

Merged
merged 1 commit into from
Aug 27, 2018

Conversation

KellenSunderland
Copy link
Contributor

@KellenSunderland KellenSunderland commented Aug 21, 2018

Description

This integrates clang-tidy into our CI system. Clang-tidy is a modern c++ linting and static-analysis tool that can find issues in our native codebase. It can also be used to modernize the codebase, suggesting improvements to adopt features that have been added to the C++11 standard.

This initial integration marks many rules as warnings and only targets cpu builds for our core native codebase. I'd like to try and introduce this as a minimum useful change. As we fix warnings we can move rules to errors in the configuration to protect against regressions.

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

/work/mxnet

ninja -v
/usr/lib/llvm-5.0/share/clang/run-clang-tidy.py -header-filter='.*' -checks='-*,modernize-use-override'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo: switch from args to yaml config file.

@KellenSunderland KellenSunderland force-pushed the clang_tidy branch 12 times, most recently from ad3ab1e to 213625d Compare August 25, 2018 12:06
@KellenSunderland KellenSunderland changed the title WIP: Clang tidy [MXNET-859] Add a clang-tidy stage to CI Aug 25, 2018
@KellenSunderland KellenSunderland force-pushed the clang_tidy branch 3 times, most recently from 3131f23 to 8359ab4 Compare August 25, 2018 14:52
@marcoabreu
Copy link
Contributor

Let me know when you are ready

@KellenSunderland
Copy link
Contributor Author

@marcoabreu: Ready to merge.

@marcoabreu marcoabreu merged commit 2f73958 into apache:master Aug 27, 2018
anirudh2290 pushed a commit to anirudh2290/mxnet that referenced this pull request Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants