Wykres commitów

81 Commity (eeb5e2f0808553cd3d77ff5ac5cfb358a8a86989)

Autor SHA1 Wiadomość Data
Jan Beran dc68d08237 fix: Bump up pre-commit hooks version 2024-02-06 13:59:52 +01:00
Roland Dobai 195ebe1d3c Merge branch 'refactor/kconfcheck_pre-commit_hook' into 'master'
refactor(pre-commit): Changed esp-idf-kconfig's kconfcheck package to pre-commit hook

Closes IDF-9051

See merge request espressif/esp-idf!28673
2024-01-30 20:07:46 +08:00
Fu Hanxi ceb2ef7208
ci: add init known warnings while generating the test child pipeline 2024-01-29 13:52:40 +01:00
Fu Hanxi d42e3fce04
ci: add sort_yaml.py 2024-01-29 13:52:39 +01:00
Jakub Kocka 022034746e refactor(pre-commit): Changed esp-idf-kconfig's kconfcheck package to pre-commit hook 2024-01-29 08:13:28 +01:00
kirill.chalov 0181f8cc88 docs(sphinx-lint): Add sphinx-lint to pre-commit
Sphinx-lint helps in linting simple formatting issues with virtually
no false positives, such as trailing spaces, missing final newlines,
presence of tabs, absence of spaces and backticks around roles, etc.
2024-01-23 15:22:30 +08:00
Jakub Kocka d9ad87c7ea ci(pre-commit): Update esp-idf-kconfig version 2024-01-16 11:41:53 +01:00
Jan Beran fa857bc9c3 feat: Use python-reorder-imports instead of isort 2024-01-12 21:43:52 +08:00
Fu Hanxi f0209338de
ci: update idf-build-apps in requirement txt files 2024-01-11 12:57:23 +01:00
Fu Hanxi fba96d58c2
ci: dynamic pipeline
build:
- upgrade idf-build-apps to 2.x
- unify get_pytest_apps and get_cmake_apps to get_all_apps
	- returns (test_apps, non_test_apps) tuple
- add tests for the new get_all_apps

assign:
- generate build report
- generate target test pipeline based on the build report

target test:
- download artifacts from minio server
- users can use `pytest --pipeline-id xxxxx` to download and flash
the binaries from the artifacts

.post:
- generate target test reports
2024-01-10 15:37:34 +01:00
Fu Hanxi b709c880dd
ci: add linter for gitlab yaml files
- remove duplicated artifacts default values
- migrate check_artifacts_expire_time.py
- migrate check_rules_yml.py
2024-01-10 15:29:42 +01:00
Tomas Sebestik d222c8a886
ci(pre-commit-hooks): update commitlinter version to 1.6.0 2024-01-02 10:00:14 +01:00
Frantisek Hrbata 09ba070b7e fix: allow to use older pre-commit hook version
With b93cc581a5 ("fix: set default pre-commit hook stages to pre-commit..")
a dependency on pre-commit 3.3 was added. As it turned out, there are
people still using e.g. 2.16 version and this change is causing problems.

1. The minimum_pre_commit_version is checked after the config is parsed.
   Meaning if there is a problem in the config file, like unknown
   pre-commit for default_stages, pre-commit exits with an error not
   suggesting that it should be updated.
2. "pre-commit" was added in 3.2 for consistency with git hook names and
   we can use "commit" instead avoiding dependency on newer pre-commit.
   For more info please see [1] and [2].
3. default_install_hook_types[4] were added in 2.18.0[3]. This was IMHO actually
   a nice feature to have in our .pre-commit-config.yaml, because it
   specifies which hooks should be installed when pre-commit install is
   executed. Meaning it's not necessary to list the stages explicitly with the -t
   options. Anyway we haven't used this feature till now, so it
   hopefully should not be a problem if we remove it again.

With this change we can still avoid to start pre-commit plugins multiple
times for different stages, but also make it compatible with older
versions(2.16).

[1] https://github.com/pre-commit/pre-commit/issues/2732
[2] https://github.com/pre-commit/pre-commit/pull/2808
[3] https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md#2180---2022-04-02
[4] https://pre-commit.com/#top_level-default_install_hook_types

Fixes: b93cc581a5 ("fix: set default pre-commit hook stages to pre-commit..")
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-12-19 10:01:43 +01:00
Frantisek Hrbata 01fed1a52e fix: do sbom manifest validation in post-commit
Following commit c3afbebf23 ("fix: bump esp-idf-sbom to v0.13.0 in pre-commit"),
the validation of submodule hash now relies solely on the information recorded
in the git-tree. Previously, the hash verification used submodule's
working tree hash if available. Since the new submodule hash is recorded
in git-tree only after the commit is created, we need to move the check
into post-commit, otherwise the hash validation checks the old value.

For example:

1. in .gitmodules

	[submodule "components/json/cJSON"]
	   sbom-hash = cb8693b058ba302f4829ec6d03f609ac6f848546

2. update the cJSON

	$ git -C components/json/cJSON checkout b45f48e600671feade0b6bd65d1c69de7899f2be

3. update cJSON hash in .gitmodules

	[submodule "components/json/cJSON"]
	   sbom-hash = b45f48e600671feade0b6bd65d1c69de7899f2be

4. commit the changes

	$ git commit -a -s

Step 4. will fail, because the validation is currently started in pre-commit stage,
where the hash for cJSON recorded in git-tree is still
cb8693b058ba302f4829ec6d03f609ac6f848546. The new hash b45f48e600671feade0b6bd65d1c69de7899f2be
will be stored in git-tree after the new commit is created.

Note that this means we cannot prevent the commit creation, but only
notify user about the hash inconsistency. If he/she still decides to
push it, it will fail in pre-commit checks in CI.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-12-18 08:48:57 +01:00
Frantisek Hrbata b93cc581a5 fix: set default pre-commit hook stages to pre-commit only
If pre-commit hook does not specify stage[1], neither in
.pre-commit-config.yaml nor in .pre-commit-hooks.yaml, it's started for every
installed pre-commit hook. Limit the default stages to pre-commit only by default.

This also sets the default_install_hook_types and
minimum_pre_commit_version and sets conventional-precommit-linter to
v1.4.1.

[1] https://pre-commit.com/#confining-hooks-to-run-at-certain-stages

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-12-14 15:12:18 +01:00
Frantisek Hrbata c3afbebf23 fix: bump esp-idf-sbom to v0.13.0 in pre-commit
v0.13.0 contains fix for the submodule hash validation. Let's
bump its version in pre-commit, so the fix is used.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-12-12 12:26:34 +01:00
Frantisek Hrbata 5df4decf07 feat: use esp-idf-sbom pre-commit plugin
Currently sbom manifest is checked only in .gitmodules and
this check is done in pre-commit and also in CI. Meaning it's running
three times(pre-commit before push if user has it enabled, in CI
as there is the pre-commit run again and again with test in CI). Since
esp-idf-sbom contains a full manifest validation support and pre-commit
plugin for it, let's use it. This removes all the current sbom testing
and replaces it with a signle pre-commit plugin which validates all
manifests files(sbom.yml, idf_component.yml, .gitmodules and also
referenced manifests) in repository. Note that this checks all
manifests, not only ones which were modified. The check is reasonably
fast though, so it should not cause any problem. The reason for
validating all manifest files is that we want to make sure that the sbom
information in .gitmodules is updated too and that the hash
recorded in .gitmodules is up-to-date. Meaning submodule update
would not trigger this plugin, because no manifest was changed.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-12-06 10:08:54 +01:00
Tomas Sebestik 394a6ec351
ci(pre-commit-hooks): update version conventional-precommit-linter 2023-11-25 08:58:54 +01:00
Frantisek Hrbata 3588267e67 fix(ci): bump astyle version to v1.0.5 in .pre-commit-config.yaml
pyyaml have problem with newer cython(3.0), this was fixed in pyyaml
6.0.1, which requires cython<3.0. The pyyaml dependency in astyle
was fixed in v1.0.5, but the pre-commit config is still useing v1.0.2.
As a result the pre-commit hooks installation of astyle can fail
on pyyaml. Fix this by bumping the astyle version for pre-commit.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-11-23 11:18:01 +01:00
Jakub Kocka d7da0bef98 bugfix(pre-commit-config): Added additional dependencies for check-kconfigs 2023-10-11 09:01:33 +02:00
Marek Fiala 37c7c5b58d feat(tools): Add shellcheck for shell scripts to CI
- shellcheck fixes in shell scripts
2023-10-03 10:57:29 +02:00
Ivan Grokhotkov c5cd97d84f
fix(precommit): correct typo in astyle-format.yml file name 2023-09-27 16:35:26 +02:00
Ivan Grokhotkov 43741ec803
ci: add astyle pre-commit check 2023-09-27 08:43:45 +02:00
Anton Maklakov af2f5dbd18 ci(pre-commit): Add rules for branch namimg
Limit slashes in branch names
    No uppercase letters in branch names
2023-09-20 12:06:34 +07:00
Chen Yudong e18125edcf fix(ci): optimize build rules patterns
add a script to check build-components-patterns in rules.yml
2023-09-12 13:47:54 +08:00
Xiao Xufeng f51258ec18 ci(pre-commit): add check that build-test-rule paths must exist 2023-08-11 17:04:35 +08:00
Fu Hanxi 60db076a96
ci: add pre-commit to cleanup ignore lists 2023-08-09 12:09:31 +08:00
radim.karnis 8acde05a5c feat: Drop Python 3.7 support 2023-08-08 08:37:29 +02:00
Tomas Sebestik 2bd570c93b ci(danger/precommit): Update incorrect scope message in commit message Danger check
Updated ' hook version
2023-08-01 07:39:07 +02:00
Roland Dobai 141dba58ea ci(pre-commit): Use the newest copyright checker 2023-07-19 14:56:02 +02:00
Tomas Sebestik c59d4e15ff docs(contributor_guide): Update install pre-commit instructions 2023-06-29 15:05:58 +02:00
Tomas Sebestik b4c84e09e2 ci(danger): Change commit message default rules
- maximum length of commit message summary 72 characters (before 50)
- drop rule for commit message summary to start with capital letter
- AI generated commit message only for poor messages
- updated version of pre-commit hook 'conventional-precommit-linter'
- update prompt AI generated commit message
2023-06-29 13:34:08 +02:00
Tomas Sebestik d8c787ab4a ci(danger): Add check for conventional commits
Add DangerJS check for convetional commit style.

Add conventional-precommit-linter hook
https://github.com/espressif/conventional-precommit-linter
2023-06-21 09:54:47 +02:00
Frantisek Hrbata 314ebbcf36 tools: add sbom-hash check to pre-commit
This uses the test from CI introduced in MR !23989. Even though the
original CI test is run with pytest, it doesn't use any pytest specific
code/features and it should never need them. So it make sense just to
re-use the code.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-14 09:31:10 +00:00
Frantisek Hrbata 73b4b8f637 tools: bump check-copyright in .pre-commit-config.yaml
Newer check-copyright version 1.0.2 contains fixes for copyrights
with single year and also the proposed date update is applied only
if number of changed lines is greater or equal to a limit. The default
limit is 5 and can be changed with the --lines-changed option if needed.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-12 14:11:58 +02:00
Fu Hanxi 22e2738f78 ci: build and test only modified components related test cases 2023-05-26 22:59:57 +08:00
Fu Hanxi 3554c6e571 ci: run readme check when constants.py or check script updated 2023-04-21 14:43:21 +08:00
Cao Sen Miao 0f8f13d21d spi_flash: only link flash vendor which is officially supported to save IRAM 2023-02-09 10:28:54 +08:00
Roland Dobai 4bd5ebb4a1 Merge branch 'tools/monitor_move' into 'master'
Tools(idf_monitor): Move idf_monitor to separate repo

Closes IDF-4109

See merge request espressif/esp-idf!22050
2023-02-07 19:47:46 +08:00
Fu Hanxi bfb29022de ci: fix isort py37 incompatible issue 2023-02-06 10:30:12 +08:00
Peter Dragun 3e3533f918 feat(idf_monitor): move idf_monitor to separate repo 2023-02-03 11:20:15 +01:00
David Cermak 6e29d3c8ad ci: Fix pre-commit hook per isort deps deprecation
isorts dependecy became deprecated. Fixed to use 5.12.0 version of isort pre-commit
2023-02-02 08:44:09 +01:00
Fu Hanxi 9e25fff9d3 ci: fix pre-commit check hook 2023-01-05 12:52:45 +08:00
Marius Vikhammer 73367a9eb2 precommit: update flake8 repo url to use github
Gitlab mirror repo has been deprecated.
2022-11-15 13:33:02 +08:00
zhangwenxu 0066649684 CI: fix pre-commit ci dependencie file pattern 2022-10-12 15:42:22 +08:00
Fu Hanxi 2d27e09b4f ci: make bringup process for check_build_test_rules.py more friendly 2022-10-10 16:58:11 +08:00
Fu Hanxi 27e199605a ci: remove unused rules 2022-10-10 16:58:11 +08:00
morris fc1aa2848b rgb_lcd: support yuv converter 2022-08-17 06:33:06 +00:00
Roland Dobai bab3830797 Tools: Fix flake8 version 5 warnings 2022-08-12 08:13:13 +00:00
Sergei Silnov 4f93db4f5a tools: Fix copyright check in pre-commit for windows 2022-07-28 15:16:53 +02:00