![Gitter](https://badges.gitter.im/Join Chat.svg)
A linter for your repository.
https://basicallydan.github.io/forkability runs the code in its client-side form (works just fine), but it requires you to log in using GitHub OAuth. It will ask for access to write to your profile, which I promise will not be exploited. This is merely a limitation of Firebase. You can't ask for no scope.
npm install forkability -g
This will give you access to the forkability
CLI. This is how you use it:
forkability basicallydan/forkability
Or whatever your username/repo combo is. It'll work with any public repo. If you start getting angry messages that you've used up your GitHub request quota, use the --username
and --password
flags, like so:
forkability jashkenas/backbone --username myusername --password totallynotmypasswordloldonttryitplz
# Basic auth!
This will give you a pretty, colourful (if your terminal supports it), UTF-8-tastic (if your terminal supports it) list of features and suggested features. It looks a bit like this:
forkability basicallydan/interfake
# Forkability found 6 recommended features, and has 4 suggestions
# Features
✓ Contributing document
✓ Readme document
✓ Licence document
✓ Test suite
# Suggestions
! Changelog document
! Uncommented issue: Comment on the issue to indicate acknowledgement
├── Support other Content-Types: https://github.com/basicallydan/interfake/issues/31
! Untouched issue: Comment or label the issue to indicate acknowledgement
├── Support other Content-Types: https://github.com/basicallydan/interfake/issues/31
! Uncommented issue: Comment on the issue to indicate acknowledgement
└── Media Responses: https://github.com/basicallydan/interfake/issues/19
--reporter
(-r
): Specify how the lint report should be output (list
(default),json
orprettyjson
)--lang
(-l
): Specify languages to use for extra features to test. Comma-separated list. (available languages)--help
(-h
): How to use the module, and will list available languages
If you're really, really into this jazz you can use the JS API. This is how it looks:
forkability(options, function(err, report) {
console.log('# Recommended files'.magenta);
report.passes.forEach(function(thing) {
console.log('✓'.green, thing);
});
report.failures.forEach(function(thing) {
console.log('✘'.red, thing);
});
});
options
accepts:
user
: The username of the repo owner (can be an organisation)repository
: The name of the repositoryauth
: An object which can contain these thingies:username
: The username to authenticate with, using basic auth.password
: The password to authenticate with, using basic auth. Needs to be supplied withusername
.token
: If you're using OAuth or something, put the authentication token here. Check outpages/pages.js
to see this badassery in action!
Thankfully, that's it.
For more info on this see contributing.md
The thing about what makes a project forkable is that there are probably various ways to look at a project and thus many opinions.
So I'd like to invite anybody reading this to open an issue, and/or make a pull request - pull requests are all the hotness right now - which details in some way what could be done to make this a more useful tool.
Thanks to everybody who has helped. So far this includes:
- Give people a recognisable score for the open-source-friendliness ("forkability") of their project
- Inform people about the open-source movement
- Educate people on the benefits of open-sourcing their code
- Tell people about how they can improve the "forkability" of their project
Make sure you npm install -g mocha
, then npm test
this repo.
- forkability.org
- forkability.io
You should not use forkability as the sole way to judge how forkable your project is. After all, it is not in any way intelligent, it is merely looking for the presence of certain features in your project in order to nudge you in the right direction.
Your best bet to make your project as forkable as possible is to ask your friends, or your friendly neighbourhood open-source community!