8000 Publish generated list of rules on documentation website by per1234 · Pull Request #261 · arduino/arduino-lint · GitHub
[go: up one dir, main page]

Skip to content

Publish generated list of rules on documentation website #261

8000 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

Merged
merged 12 commits into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Refer to the platform "extra_flags" properties in a less confusing ma…
…nner

There is a convention of configuring Arduino boards platforms to provide a user interface for configuring the build
process through the addition of references and fallback empty definitions of a series of properties that follow the
format of `compiler.<pattern type>.extra_flags`, where "<pattern type>" corresponds to the compilation pattern that
references them:

- `c`
- `cpp`
- `S`
- `ar`
- `c.elf`

Previously, `x` was used as a placeholder for the component of the property name that varies in order to allow a single
rule to refer to the entire set. "<pattern type>" is a little bit more clear than "x".
  • Loading branch information
per1234 committed Aug 26, 2021
commit fbda05ebf198ec5d6649609f52f95f77725b57ee
4 changes: 2 additions & 2 deletions internal/rule/ruleconfiguration/ruleconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -1696,8 +1696,8 @@ var configurations = []Type{
Category: "configuration files",
Subcategory: "boards.txt",
ID: "PF009",
Brief: "use of compiler.x.extra_flags",
MessageTemplate: "Board ID(s) {{.}} use compiler.x.extra_flags properties. These are intended to be left for use by the user.",
Brief: "use of compiler.<pattern type>.extra_flags",
MessageTemplate: "Board ID(s) {{.}} use compiler.<pattern type>.extra_flags properties. These are intended to be left for use by the user.",
Description: "A board definition in the platform's `boards.txt` configuration file is using one of the `compiler.<pattern type>.extra_flags` properties (e.g., `compiler.cpp.extra_flags`). These are intended to be left for use by the user as a standardized interface for customizing the compilation commands. The platform author can define as many arbitrary properties as they like, so there is no need for them to take the user's properties.",
Reference: "",
DisableModes: nil,
Expand Down
2 changes: 1 addition & 1 deletion internal/rule/rulefunction/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func BoardsTxtBoardIDBuildCoreLTMinLength() (result ruleresult.Type, output stri
return ruleresult.Pass, ""
}

// BoardsTxtUserExtraFlagsUsage checks if the user's compiler.x.extra_flags properties are used in boards.txt.
// BoardsTxtUserExtraFlagsUsage checks if the user's compiler.<pattern type>.extra_flags properties are used in boards.txt.
func BoardsTxtUserExtraFlagsUsage() (result ruleresult.Type, output string) {
if projectdata.BoardsTxtLoadError() != nil {
return ruleresult.NotRun, "Couldn't load boards.txt"
Expand Down
0