Repolinter
Last modified by superadmin on 2020/04/18 20:53
Repolinter
We strongly suggest using repolinter to ensure your project conforms with typical community standards. An example configuration below enforces:
- A valid known license.
- A README file that references the licenses
- A CONTRIBUTING file
- A Code of Conduct
- That binaries are not present
- That there are tests and CI
- That the source files contain the relevant copyright and an SPDX identifier
- That a dependency management system is used.
Example:
{
"rules": {
"all": {
"license-file-exists:file-existence": ["error", {"files": ["LICENSE*", "COPYING*"]}],
"readme-file-exists:file-existence": ["error", {"files": ["README*"]}],
"contributing-file-exists:file-existence": ["error", {"files": ["CONTRIB*"]}],
"code-of-conduct-file-exists:file-existence": ["error", {"files": ["CODEOFCONDUCT*", "CODE-OF-CONDUCT*", "CODE_OF_CONDUCT"]}],
"readme-references-license:file-contents": ["error", {"files": ["README*"], "content": "license", "flags": "i"}],
"binaries-not-present:file-type-exclusion": ["error", {"type": ["**/*.exe", "**/*.dll", "*.o", "*.so"]}],
"license-detectable-by-licensee": ["error"],
"test-directory-exists:directory-existence": ["error", {"directories": ["test*", "specs"]}],
"integrates-with-ci:file-existence": ["warning", {"files": [".gitlab-ci.yml", ".travis.yml", "appveyor.yml", "circle.yml"]}],
"source-license-headers-exist:file-starts-with": ["error", {"files": ["*.py"], "lineCount": 30, "patterns": ["Copyright", "The Linux Foundation", "All rights reserved", "SPDX-License-Identifier"]}]
},
"javascript": {
"package-metadata-exists:file-existence": ["error", {"files": ["package.json"]}]
},
"ruby": {
"package-metadata-exists:file-existence": ["error", {"files": ["Gemfile"]}]
},
"java": {
"package-metadata-exists:file-existence": ["error", {"files": ["pom.xml", "build.xml", "build.gradle"]}]
},
"python": {
"package-metadata-exists:file-existence": ["error", {"files": ["requirements.txt", "setup.py"]}]
}
}
}
"rules": {
"all": {
"license-file-exists:file-existence": ["error", {"files": ["LICENSE*", "COPYING*"]}],
"readme-file-exists:file-existence": ["error", {"files": ["README*"]}],
"contributing-file-exists:file-existence": ["error", {"files": ["CONTRIB*"]}],
"code-of-conduct-file-exists:file-existence": ["error", {"files": ["CODEOFCONDUCT*", "CODE-OF-CONDUCT*", "CODE_OF_CONDUCT"]}],
"readme-references-license:file-contents": ["error", {"files": ["README*"], "content": "license", "flags": "i"}],
"binaries-not-present:file-type-exclusion": ["error", {"type": ["**/*.exe", "**/*.dll", "*.o", "*.so"]}],
"license-detectable-by-licensee": ["error"],
"test-directory-exists:directory-existence": ["error", {"directories": ["test*", "specs"]}],
"integrates-with-ci:file-existence": ["warning", {"files": [".gitlab-ci.yml", ".travis.yml", "appveyor.yml", "circle.yml"]}],
"source-license-headers-exist:file-starts-with": ["error", {"files": ["*.py"], "lineCount": 30, "patterns": ["Copyright", "The Linux Foundation", "All rights reserved", "SPDX-License-Identifier"]}]
},
"javascript": {
"package-metadata-exists:file-existence": ["error", {"files": ["package.json"]}]
},
"ruby": {
"package-metadata-exists:file-existence": ["error", {"files": ["Gemfile"]}]
},
"java": {
"package-metadata-exists:file-existence": ["error", {"files": ["pom.xml", "build.xml", "build.gradle"]}]
},
"python": {
"package-metadata-exists:file-existence": ["error", {"files": ["requirements.txt", "setup.py"]}]
}
}
}