Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions NUSense/.clangd
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this file affect or influence the parent .clang files, i.e. .clang-format and .clang-tidy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, .clangd is only used by clangd, .clang-format is only used by clang-format, .clang-tidy is only used by clang-tidy, and they don't have any connection to each other

clang-format formats files, clang-tidy lints code to detect errors, whereas clangd is a language server used to integrate code into an IDE with code completion, compile errors, etc.

I'm not sure if there's any reason to use clang-tidy if using clangd, clangd seems to provide a superset of clang-tidy's functionality, as well as proper IDE integration

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correction, the vscode clangd extension actually embeds both: clang-format (reads .clang-format) providing formatting, and clang-tidy (reads .clang-tidy) which

provides extra hints about code problems: bug-prone patterns, performance traps, and style issues.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Diagnostics:
UnusedIncludes: None
Includes:
IgnoreHeader:
- Core/Inc/main.h,
- Drivers/.*
---
If:
PathMatch: Drivers/.*
Diagnostics:
Suppress: '*'
13 changes: 13 additions & 0 deletions NUSense/compile_flags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-DDEBUG
-DSTM32H753xx

-ICore/Inc
-IUSB_DEVICE/App
-IUSB_DEVICE/Target
-IDrivers/STM32H7xx_HAL_Driver/Inc
-IDrivers/STM32H7xx_HAL_Driver/Inc/Legacy
-IMiddlewares/ST/STM32_USB_Device_Library/Core/Inc
-IMiddlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc
-IDrivers/CMSIS/Device/ST/STM32H7xx/Include
-IDrivers/CMSIS/Include
-ICore/Src