Skip to content

Strict check on libraries should check for header guards or #pragma once #325

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

Closed
Strooom opened this issue Jan 17, 2022 · 2 comments
Closed
Assignees
Labels
conclusion: declined Will not be worked on topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@Strooom
Copy link

Strooom commented Jan 17, 2022

I think a header file for a library should always have either header guards or #pragme once, so the linter should check for that.
I checked a library without that, and it passed the checks..

@per1234
Copy link
Contributor

per1234 commented Jan 17, 2022

Thanks for your suggestion @Strooom.

Linting of C++ is outside the scope of the Arduino Lint project. The reason is that there are already a tremendous number of excellent tools for C++ code. So there is no need for Arduino to produce another one.

The opportunity for us to provide something of value is in the area of Arduino-specific things such as the library.properties metadata file, Library Manager compliance, sketch folder structure, boards platform configuration files, package index data, etc.

@per1234 per1234 closed this as completed Jan 17, 2022
@per1234 per1234 added conclusion: declined Will not be worked on topic: code Related to content of the project itself type: enhancement Proposed improvement labels Jan 17, 2022
@per1234 per1234 self-assigned this Jan 17, 2022
@Strooom
Copy link
Author

Strooom commented Jan 17, 2022

I understand, but I think the #pragma once check belongs more to the structure of a good library, than to the C++ contents of it. Anyway, thanks for your fast response and thank you for Arduino Lint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: declined Will not be worked on topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants