Commit Graph

7 Commits

Author SHA1 Message Date
fanquake d873ff96e5
refactor: cleanups post unsubtree'ing univalue
Mostly changes to remove src/univalue exceptions from the various linters,
and the required code changes to make them happy. As well as minor doc
changes.
2022-06-15 12:56:44 +01:00
laanwj 908fb7e2ec test: Use permissions from git in `lint-files.py`
Instead of using permissions from the local file system, which might
depend on the umask, directly check the permissions from git's metadata.
2022-05-23 11:09:07 +02:00
laanwj 48d2e80a74 test: Don't use shell=True in `lint-files.py`
Avoid the use of shell=True.
2022-04-28 12:29:24 +02:00
MarcoFalke fae211c0ae
lint: Start to use py lint scripts 2022-04-04 16:58:54 +02:00
Gleb Naumenko 0659f12b13
Add minisketch dependency 2021-10-21 09:38:55 +08:00
windsok 2227fc4e62 test: minor fixes & improvements for files linter test
Updates the lint-files.py lint test:
* Use a context manager when opening files, so that files are closed.
* Use the -z flag when shelling out to git ls-files so that we can catch newlines
  and other weird control characters in filenames
2021-05-06 18:21:06 -07:00
windsok 46b025e00d test: add new python linter to check file names and permissions
Replaces the existing tests in the test/lint/lint-filenames.sh and test/lint/lint-shebang.sh linter tests, as well as adding some new and increased testing.
Summary of tests:
- Checks every file in the repository against an allowed regexp to make sure only lowercase or uppercase alphanumerics (a-zA-Z0-9), underscores (_), hyphens (-), at (@) and dots (.) are used in repository filenames.
- Checks only source files (*.cpp, *.h, *.py, *.sh) against a stricter allowed regexp to make sure only lowercase alphanumerics (a-z0-9), underscores (_), hyphens (-) and dots (.) are used in source code filenames. Additionally there is an exception regexp for directories or files which are excepted from matching this regexp (This should replicate the existing test/lint/lint-filenames.sh test)
- Checks all files in the repository match an allowed executable or non-executable file permission octal. Additionally checks that for executable files, the file contains a shebang line.
- Checks that for executable .py and .sh files, the shebang line used matches an allowable list of shebangs (This should replicate the existing test/lint/lint-shebang.sh test)
- Checks every file that contains a shebang line to ensure it has an executable permission

Fixes #21729
2021-04-29 17:00:58 -07:00