オープンソース・ソフトウェアの定義は簡単で、OSIに認められたライセンスを使っているかどうかです。しかし、さらに使われるソフトウェアとなると話は別です。ソフトウェアが良いのはもちろんですが、他にも必要な情報があります。 今回はオープンソース・プロジェクトが良いものかどうか判断してくれるRepolinterを紹介します。

Repolinterの使い方

Repolinterを任意のオープンソース・プロジェクトで実行したところです。

$ npx repolinter
Ruleset: ../../.npm/_npx/23004/lib/node_modules/repolinter/rulesets/default.json
Linguist Axiom: Linguist not found in path, only running language-independent rules
Licensee Axiom: Licensee not found in path, only running license-independent rules
✔ license-file-exists: found (LICENSE)
✔ readme-file-exists: found (README.md)
✖ contributing-file-exists: not found: (CONTRIB*)
✖ code-of-conduct-file-exists: not found: (CODEOFCONDUCT*, CODE-OF-CONDUCT*, CODE_OF_CONDUCT*)
✖ support-file-exists: not found: (SUPPORT*)
✔ readme-references-license: File README.md contains license
✔ binaries-not-present: Excluded file type doesn't exist (**/*.exe,**/*.dll,!node_modules/**)
✖ test-directory-exists: not found: (**/test*, **/specs)
✖ integrates-with-ci: not found: (.gitlab-ci.yml, .travis.yml, appveyor.yml, circle.yml, .circleci/config.yml, Jenkinsfile)
✖ github-issue-template-exists: not found: (ISSUE_TEMPLATE*, .github/ISSUE_TEMPLATE*)
✖ github-pull-request-template-exists: not found: (PULL_REQUEST_TEMPLATE*, .github/PULL_REQUEST_TEMPLATE*)
✖ license-detectable-by-licensee: Licensee not installed

ライセンスファイルの有無であったり、サポートファイルやREADMEなど様々なファイルの存在をチェックしてくれます。GitHub Issueのテンプレートもあると望ましいという指摘もあります。すべてをクリアするのは難しいかも知れませんが、こういった指摘を確認することでより使いやすいソフトウェアを目指せるようになるでしょう。

Repolinterはnode/JavaScript製のオープンソース・ソフトウェア(Apache Licnese 2.0)です。

todogroup/repolinter: Open Source Repository Linter