Commit Graph

3 Commits

Author SHA1 Message Date
Alexander Couzens f8710473d1 lint: annotate lines in gerrit
Use robot comments to add line based comments for the lint output.
Add checkpatch_json from coreboot 9cae17d0 to parse the checkpatch
output and convert it into a gerrit parsable format.

Example:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/29294

Co-Authored-By: Oliver Smith <osmith@sysmocom.de>
Change-Id: I1a48ddb976e0f53bfc0552d0be11e42ba68d9e49
2022-09-08 17:10:51 +02:00
Oliver Smith 41e218a355 lint: catch missing --rm flag for 'docker run'
Not having the --rm flag causes docker containers to be stored forever,
so make sure we always add it to the "docker run" commands that we run
on jenkins via scripts in various repositories.

Depends: docker-playground I48b01c43fedf379b8a565eaab0369806d7831bd8
Related: https://osmocom.org/projects/osmocom-servers/wiki/Docker_cache_clean_up
Related: SYS#5827, OS#5099
Change-Id: I8ab9c291504475d670bdefc50c4524c5bdd4c880
2022-02-11 15:44:16 +01:00
Oliver Smith d58b999e0f lint: add helper scripts
Add lint_diff.sh, which runs checkpatch on git diff to either HEAD~1 (if
the tree is clean) or HEAD. This can be used as pre-commit hook, and
it's what jenkins will run.

Add lint_all.sh, which runs checkpatch on a whole repository to test if
the rules we are checking for make sense in Osmocom context.

Related: OS#5087
Change-Id: I1d02c169b05fb05b87209a444a5ddb86efc99d04
2021-06-16 16:49:47 +02:00