#
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
|
#
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 ...
|