Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
titleExample
# Clone the repository and cd into its directory; don't forget git submodule update --init --recursive
all_source_files=$(find $SOURCE_DIRECTORY -name '*.[ch]pp')
clang-format -i -fallback-style=none -style=file $all_source_files || exit 1
modified="$(git status --porcelain --untracked-files=no)"
if [ -n "$modified" ]; then echo "Run enforce_style.sh to reformat the code."; exit 2; fi

clang-tidy

This section is missing. Please, come back later.Clang-Tidy can be used to enforce some of the MISRA rules. A compliant configuration is provided below; the provided configuration, however, is still a work-in-progress, so use with care.

Code Block
title.clang-tidy
---
Checks: >-
  boost-*,
  bugprone-*,
  cert-*,
  clang-analyzer-*,
  cppcoreguidelines-*,
  google-*,
  hicpp-*,
  llvm-*,
  misc-*,
  modernize-*,
  performance-*,
  portability-*,
  readability-*,
  -google-readability-todo,
  -readability-avoid-const-params-in-decls,
  -llvm-header-guard,
WarningsAsErrors: true
HeaderFilterRegex: '.*'
AnalyzeTemporaryDtors: false
FormatStyle: file
...


Legacy

Eclipse IDE autoformatter

...