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

integrate clang-tidy with v1 build #226

Open
thirtytwobits opened this issue May 26, 2019 · 3 comments
Open

integrate clang-tidy with v1 build #226

thirtytwobits opened this issue May 26, 2019 · 3 comments
Assignees
Labels
class-requirement Issue that can be traced back to a design requiement domain-verification Issues and tasks related to build automation (CI), Tests, and/or Reports. priority-high
Milestone

Comments

@thirtytwobits
Copy link
Contributor

run clang-tidy at build-time.

@thirtytwobits thirtytwobits added class-feature v1 domain-build Issues that are about building libcyphal. labels May 26, 2019
@thirtytwobits thirtytwobits added domain-verification Issues and tasks related to build automation (CI), Tests, and/or Reports. and removed domain-build Issues that are about building libcyphal. labels May 29, 2019
@thirtytwobits thirtytwobits added this to the pre-v1.0.0-2 milestone May 29, 2019
@thirtytwobits thirtytwobits modified the milestones: pre-v1.0.0-2, v1.0.0-alpha Jul 5, 2019
@thirtytwobits thirtytwobits removed this from the v1.0.0-alpha milestone Feb 21, 2020
@pavel-kirienko pavel-kirienko added priority-high class-requirement Issue that can be traced back to a design requiement and removed v1 class-feature labels Apr 4, 2024
@pavel-kirienko pavel-kirienko added this to the v0.9 milestone Apr 4, 2024
@pavel-kirienko
Copy link
Member

Clang-Tidy should be integrated via CXX_CLANG_TIDY and Sonar needs to be invoked on pull request builds or when the commit is tagged with #sonar.

@serges147 I would like to prioritize this because the way the codebase is now we're already going to have to go back and modify it to make Clang-Tidy and Sonar accept it.

@serges147
Copy link
Collaborator

@pavel-kirienko Pavel, I'm right that I can use exactly the same approach as in CETL in terms of Sonar? Also where to get clang-tidy config file?

@pavel-kirienko
Copy link
Member

  1. Yes; alternatively, you could use Dyshlo as a reference.
  2. Let's start with this one (it may require some tweaking but we'll get to that later):
Checks: >-
  boost-*,
  bugprone-*,
  cert-*,
  clang-analyzer-*,
  cppcoreguidelines-*,
  google-*,
  hicpp-*,
  llvm-*,
  misc-*,
  modernize-*,
  performance-*,
  portability-*,
  readability-*,
  -cppcoreguidelines-avoid-const-or-ref-data-members,
  -google-readability-todo,
  -readability-avoid-const-params-in-decls,
  -readability-identifier-length,
  -llvm-header-guard,
  -llvm-include-order,
  -*-use-trailing-return-type,
  -*-named-parameter,
CheckOptions:
  - key:   readability-function-cognitive-complexity.Threshold
    value: '90'
  - key:   readability-magic-numbers.IgnoredIntegerValues
    value: '1;2;3;4;5;8;10;16;20;32;60;64;100;128;256;500;512;1000'
WarningsAsErrors: '*'
HeaderFilterRegex: '.*\.hpp'
AnalyzeTemporaryDtors: false
FormatStyle: file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
class-requirement Issue that can be traced back to a design requiement domain-verification Issues and tasks related to build automation (CI), Tests, and/or Reports. priority-high
Projects
None yet
Development

No branches or pull requests

3 participants