aws / s2n-tls

An implementation of the TLS/SSL protocols
https://aws.github.io/s2n-tls/usage-guide/
Apache License 2.0
4.53k stars 711 forks source link

Copyright linter misses rust files, python files, etc. #4078

Open tinzh opened 1 year ago

tinzh commented 1 year ago

Problem:

The copyright linter skips over files not explicitly allowlisted in codebuild/bin/copyright_mistake_scanner.sh, including .rs files which comprise most of bindings/rust, .c/.h files not starting with s2n_ like those in bin/, etc.

Solution:

Add all files with .c, .h, .rs, .py, .cc, .sh, etc. extensions to the allowlist in the copyright linter. Alternatively, use a denylist instead in case more file types are added in the future.

Requirements / Acceptance Criteria:

Files without a copyright header that need one should not pass CI.

Out of scope:

None

ma-ilsi commented 1 year ago

Related to #2298

ma-ilsi commented 1 year ago

If I understand the linter correctly, it is then also not checking the .ymls in codebuild/spec/, which also needs amending. Correct?

Or does the linter only focus on certain directories on not others (which I highly doubt, as the previous and current proposed solution is to allow/deny certain file extensions generally, regardless of their directories).

maddeleine commented 1 year ago

Yep, our copyright linter isn't that sophisticated so it currently misses our yaml files.

dougch commented 1 year ago

Another option for a linter, GHA https://github.com/todogroup/repolinter/blob/main/docs/rules.md#file-starts-with