A dumb regex linter for standard-readme
This is a linter that only checks by searching your document for string matches. It does not check for these matches based on what section they're in, which is why it is called a dumb checker.
npm i -g standard-readme-linter-regex
standard-readme-linter-regex README.MD -c /Users/richard/src/standard-readme-linter-regex/config.js -r standard-readme-linter-regex -p richardlitt -n RichardLitt -l https://burntfen.com
--project, -p The overarching project
--repo, -r The name of the repository
--config, -c The full path to a config js file to require
--projectName The name of the project
--projectLink The link to the project's main page
This package is aliased as srlr
.
You can also use an external configuration file to define extra RegExps to check. For instance:
srlr README.MD -c /Users/richard/src/standard-readme-linter-regex/example-config.js
See the example config file for an example.
Note: These will override existing checks.
Is the filename README
?
Is it a Markdown file, ending in .md
?
Who is the GitHub organization or profile to whom this repository belongs? What is the project?
Note: This is used in the link checking. It will automatically default to the parent folder's name if no project is provided through the CLI.
Does the title matches the folder name and is it prefixed with #
?
Does the title start the README?
Is the standard-readme badge present?
Is there an install section?
Is there an usage section?
Is there an maintainers section?
Is there a contributing section?
Is there a link to the GitHub issues?
Note: This uses the project
setting.
Is there a license section?
Is this a repository holding code? Or is there a string that says: This repository is only for documents.
?
Is there an MIT license, formatted as [MIT](LICENSE)
?
Note: _This does not appear if codeRepo
is true
.
Is there a CC-BY
string?
Note: _This appears if codeRepo
is true
.
Is there a ©
symbol?
Is the year after the copyright symbol?
Is there a copyright name?
~/src/RichardLitt/standard-readme-linter-regex $ srlr README.md
README:true
markdown:true
project:RichardLitt
repo:true
titleAtStart:true
standardReadmeBadge:false
install:true
usage:true
maintainers:true
contributing:true
issuesLink:false
license:true
codeRepo:false # Note: This is dumb, and matches the string in the example above.
ccLicense:true # mitLicense disabled for non-code Repos. Same error with matching.
mitLicense:true
copyright:true
copyrightYear:true
copyrightName:true
Please do! Check out the issues.
MIT © 2016 Richard Littauer