b92dab75 | 10-Jun-2025 |
Patrick Williams <patrick@stwcx.xyz> |
markdownlint: allow sub/sup HTML
Github markdown only supports subscript and superscript with the `<sub>` and `<sup>` HTML tags. Allow those to be in our markdown files.
Signed-off-by: Patrick Wil
markdownlint: allow sub/sup HTML
Github markdown only supports subscript and superscript with the `<sub>` and `<sup>` HTML tags. Allow those to be in our markdown files.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If2ea93cd71e6da2f11ee04caed01321de5894453
show more ...
|
491a46c0 | 10-Jun-2025 |
Patrick Williams <patrick@stwcx.xyz> |
markdownlint: allow break HTML
Github markdown only allows the `<br>` tag to be used in a table to force a newline (there is otherwise no standard). Allow this in the markdownlint config.
Signed-o
markdownlint: allow break HTML
Github markdown only allows the `<br>` tag to be used in a table to force a newline (there is otherwise no standard). Allow this in the markdownlint config.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I4d48352c678018d12aab3c1c9ec4c9e7eb1cbb42
show more ...
|
f20083bc | 10-Jun-2025 |
Patrick Williams <patrick@stwcx.xyz> |
markdownlint: disable line length via config
We don't want the markdownlint warning for line length when in a table or code block but even with those disabled, markdownlint sometimes gives spurious
markdownlint: disable line length via config
We don't want the markdownlint warning for line length when in a table or code block but even with those disabled, markdownlint sometimes gives spurious warnings. Disable it with a config rather than as an argument.
We will end up getting the code reformatted with prettier anyhow which will handle line lengths on its own.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6a6d2b2c798266ef067ba2b6b1e02279b59e1461
show more ...
|
13dd2fb0 | 04-Mar-2025 |
Patrick Williams <patrick@stwcx.xyz> |
gitlint: screen userid from Signed-off-by
It is a common issue for new users to have a git-config that has a user id (either from their system or github) rather than a legal name matching an entry i
gitlint: screen userid from Signed-off-by
It is a common issue for new users to have a git-config that has a user id (either from their system or github) rather than a legal name matching an entry in their associated CLA. Screen these out in the gitlint check, so maintainers do not need to check this manually.
Some individuals decide to go by a one word name. Provide an exception for this.
Tested:
``` -: UC3 Signed-off-by user has too few words; likely user id instead of legal name?: "Signed-off-by: foo <foo@nobody.com>" -: UC3 Invalid Signed-off-by format: "Signed-off-by: bar" ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie87d640db8f0d223912f7c3b77545347020255ee
show more ...
|
9ce4de3b | 26-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
gitlint: screen multiple change-ids
Tested: ``` $ ./scripts/format-code.sh --enable commit_gitlint Formatting code under .../openbmc-build-scripts Running commit_gitlint -: UC2 Multiple Chan
gitlint: screen multiple change-ids
Tested: ``` $ ./scripts/format-code.sh --enable commit_gitlint Formatting code under .../openbmc-build-scripts Running commit_gitlint -: UC2 Multiple Change-Ids found in commit message body: "['Change-Id: Iec3501f75927d58bfe176423ce3eac824a0553d9', 'Change-Id: Iec3501f75927d58bfe176423ce3eac824a0553d9']" commit_gitlint: FAILED ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iec3501f75927d58bfe176423ce3eac824a0553d9
show more ...
|
97624ea4 | 22-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
gitlint: allow Fixes to exceed line length
The Kernel convention for "Fixes" directives is as follows[1]:
``` If your patch fixes a bug in a specific commit, e.g. you found an issue using git bisec
gitlint: allow Fixes to exceed line length
The Kernel convention for "Fixes" directives is as follows[1]:
``` If your patch fixes a bug in a specific commit, e.g. you found an issue using git bisect, please use the ‘Fixes:’ tag with the first 12 characters of the SHA-1 ID, and the one line summary. Do not split the tag across multiple lines, tags are exempt from the “wrap at 75 columns” rule in order to simplify parsing scripts. ```
Some repositories follow this convention, so allow it in the commit message by ignoring lines that start with "Fixes:".
[1]: https://docs.kernel.org/process/submitting-patches.html
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I81aa98663d421ff670f09dd048d12a48c32ce3c5
show more ...
|
c0fab5e2 | 09-Sep-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Use codespell's dictionary for spell checking
When we first enabled spell checking, we duplicated the dictionary file used by the kernel community and named it `openbmc-spelling.txt`. Since we added
Use codespell's dictionary for spell checking
When we first enabled spell checking, we duplicated the dictionary file used by the kernel community and named it `openbmc-spelling.txt`. Since we added the dictionary in 2021, only two changes have been made to it.
Meanwhile, the size of the kernel community’s dictionary has grown from 32 KB to 1.4 MB and is now included as part of the codespell library. As the dictionary is readily available on the system, we will now use it directly for spell checks. This offers several benefits:
1. Automatically use the latest dictionary whenever the codespell library is updated. 2. Reduce maintenance overhead and avoid data duplication.
In the future, if we need to add a word that is specific to OpenBMC, we can create a new dictionary file with just those entries and run a separate codespell check using that file.
Change-Id: I2897ab159e0a6c14480e1ee2593761ab550a19e9 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
7d41f6d2 | 06-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
format-code: enable markdownlint
Enable markdownlint but allow it to always pass. This will allow maintainers the opportunity to run the tools and fix up their own markdown before we enable this gl
format-code: enable markdownlint
Enable markdownlint but allow it to always pass. This will allow maintainers the opportunity to run the tools and fix up their own markdown before we enable this globally.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie397a72ca4ef113cdbe433d263ccf3bd5063cf4b
show more ...
|
b08ddf77 | 06-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
format-code: enable prettier
prettier is a formatter for YAML, JSON, Markdown, etc.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I7a47d02ef7382d811423b97a88132aa92b991eed |
e08ffba8 | 05-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
python: fix flake8 warnings and format with black
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic54f4a3ecf328b0d2c65af5cfd9eb2048d671ad5 |
d535ecb4 | 02-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
format-code: simplify exclusion filter for clang
The clang-format linter calls have a custom ignore list. Write a python script for reusable git-ignore-like filtering and switch the clang-format li
format-code: simplify exclusion filter for clang
The clang-format linter calls have a custom ignore list. Write a python script for reusable git-ignore-like filtering and switch the clang-format linter call to use it.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I788c0e3de55fae592318a997b676c73a7f13e74c
show more ...
|
0f5f0e75 | 27-Nov-2022 |
Patrick Williams <patrick@stwcx.xyz> |
format-code: simplify codespell
* Avoid copying codespell config files into the workspace. * Drop 'ignore-words' support. * Filter out Signed-off-by lines.
The 'openbmc-spelling-ignore.txt' file co
format-code: simplify codespell
* Avoid copying codespell config files into the workspace. * Drop 'ignore-words' support. * Filter out Signed-off-by lines.
The 'openbmc-spelling-ignore.txt' file contained someone's last name, which was being triggered by codespell as being similar enough to a real word that it was identified as a mispelling. Instead of keeping their name in an ignore file, filter out the Signed-off-by.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie2c96a000c352dc02a5dee1db3d2d9ea2b629cef
show more ...
|
fb9948a3 | 21-Jun-2022 |
Ed Tanous <edtanous@google.com> |
Enforce commit message style
Throughout the project, it is a manual human process to enforce the idea of commit message formatting, and leads to more conflict than would ideally be required for some
Enforce commit message style
Throughout the project, it is a manual human process to enforce the idea of commit message formatting, and leads to more conflict than would ideally be required for something that's relatively algorithmic, and able to be enforced by CI. Jenkins is able to give faster response times to users, thus ensuring that committers are more likely to be able to resolve their commit message issues in a timely manner.
This commit adds the gitlint[1] application to our builds, and integrates its checks with CI in the format-code.sh script. Gitlint appears to be a relatively active project with a number of releases, relatively up to date commits on its github, and by the documentation as well as this authors testing, appears to do exactly what the project needs in terms of checks.
gitlint has a number of configuration options[2], of which the defaults appear to be ok for OpenBMCs style requirements. This commit checks in a .gitlint file that was generated via 'gitlint generate-config' to use as a starting point.
To avoid impacting the entire project at this time, this commit checks for the existence of a .openbmc-enforce-gitlint file in the root of the directory, and uses that to gate its scanning. At some point in the future, once we've determined this meets our needs, this check will be removed so that we can enforce this project-wide.
This commit makes use of the gitlint plugin system to support one important feature that OpenBMC requires for block line length. The custom line length rule allows: 1. Block comments to exceed the line length limit 2. Signed-Off-By sections to exceed the line length limit 3. Tabbed in sections to exceed the line length limit
Presumably this same mechanism could be used to handle openbmc/openbmc commits, to allow meta-<name> to precede the title and go over the allowed limit, but for the moment, format-code.sh does not apply to openbmc/openbmc, so this would be for a future change to repotest
When these fails, it attempts to give the user a message that conveys these allowals to let them fix their commit message quickly.
Tested: Created a commit with a title that was too long, as well as added a .openbmc-enforce-gitlint file in bmcweb. Ran openbmc-build-scripts and observed.
''' -: UC1 Line exceeds max length (101>72). It's possible you intended to use one of the following exceptions: 1. Put logs or bash lines in a quoted section with triple quotes (''') before and after the section 2. Put a long link at the bottom in a footnote. example: [1] https://my_long_link.com Line that was too long: : "VERY LONG LOG LINE THAT TAKES WAY TOO MUCH SPACE AND GOES OVER 72 CHARACTERS, which is a problem" '''
[1] https://jorisroovers.com/gitlint/ [2] https://jorisroovers.com/gitlint/configuration/ [3] https://jorisroovers.com/gitlint/user_defined_rules/ [4] https://github.com/jorisroovers/gitlint/issues/255#issuecomment-1063494186
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: If42a22bfeca223fd5bc8f35ed937aa5f60713f2a
show more ...
|
81692c05 | 04-Aug-2022 |
Patrick Williams <patrick@stwcx.xyz> |
spelling: add ignore list
Thu Ba reported that their name is getting rejected as a spelling mistake in their Signed-off-by. Add capability to ignore words from the primary dictionaries and add 'ba'
spelling: add ignore list
Thu Ba reported that their name is getting rejected as a spelling mistake in their Signed-off-by. Add capability to ignore words from the primary dictionaries and add 'ba' to the ignore list.
Tested:
Before change, manually running codespell results in: ``` ./config/openbmc-spelling-ignore.txt:1: Ba ==> By, be ``` Manually running codespell with ignore-list option removes this.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I33134e519e28024926b6da00340d2d52e2e884bd
show more ...
|
df6170e9 | 21-Dec-2021 |
Patrick Williams <patrick@stwcx.xyz> |
spellcheck: move dictionary to config dir
Consolidate all configuration into the 'config' directory rather than having a 'dictionary' subdirectory with a single file in it.
Signed-off-by: Patrick W
spellcheck: move dictionary to config dir
Consolidate all configuration into the 'config' directory rather than having a 'dictionary' subdirectory with a single file in it.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I45d3508a5875148c3fb90150da98013de6a568e7
show more ...
|
213cf83c | 06-Nov-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
eslint: Ignore the meson-* & subprojects folder in the workspace
Modify eslint configuration to ignore the meson-* folder (ignores the meson build log files - that fails(below) the json validation t
eslint: Ignore the meson-* & subprojects folder in the workspace
Modify eslint configuration to ignore the meson-* folder (ignores the meson build log files - that fails(below) the json validation test). This helps users to re-use the build directory while running the local CI.
Also ignoring the meson subprojects folder as , we dont want eslint to be checking for errors that are not part of openbmc.
Fixes : /home/zshelle/sandbox/bmc1/openpower-hw-diags/build/meson-logs/testlog-ubasan.json 2:2 error End of file expected json/* /home/zshelle/sandbox/bmc1/openpower-hw-diags/build/meson-logs/testlog-valgrind.json 2:2 error End of file expected json/* /home/zshelle/sandbox/bmc1/openpower-hw-diags/build/meson-logs/testlog.json 2:2 error End of file expected json/* ✖ 3 problems (3 errors, 0 warnings)
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: If2f03aab86db953187a5ca8f3828263582d56712
show more ...
|
87111bb7 | 14-Aug-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
JSON validation support in CI
Most of the openbmc repositories depend on JSON configuration files, which are consumed by the respective daemons at runtime.
It's a good value add to catch the JSON v
JSON validation support in CI
Most of the openbmc repositories depend on JSON configuration files, which are consumed by the respective daemons at runtime.
It's a good value add to catch the JSON validation errors early in the repository CI itself.
By default, the CI would be picking config/eslint-global-config as the default configuration to run the JSON validation. The default configuration can be overridden by the presence of the .eslintrc.json file from the repository for which the CI is running against.
Repositories cannot completely opt-out of the JSON validation, but they choose to skip whatever files/folders they want using the .eslintignore configuration file or, they can also write the rules in .eslintrc.json config file to turn errors into warnings.
This commit brings in eslint & eslint-plugin-json which does only the "json validation".
Visit the below link(s) for more details & various error's/warnings that this plugin would report: https://www.npmjs.com/package/eslint-plugin-json https://github.com/azeemba/eslint-plugin-json
I have tested all the repos under openbmc with the eslint-global-config and only two repos are breaking due to this change, they are already fixed(please check the topic: "json-validation" for more details)
Testing Example : 1. Make a json bad by purposefully removing a comma
Running the json validator on the repo using it's config >
/home/manojeda/ci_test_area/pldm/configurations/fru_master.json 19:26 error Expected comma json/*
✖ 1 problem (1 error, 0 warnings)
2. if the json is good, the validation proceeds fruther without any issues.
Change-Id: I2c2c14b18bb626b1a5ab5d818b92d5ba370e1639 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|