Add more documentation.
This commit is contained in:
27
README.md
27
README.md
@@ -1,11 +1,26 @@
|
|||||||
.editorconfig CLI
|
.editorconfig CLI
|
||||||
=================
|
=================
|
||||||
|
|
||||||
|
This CLI tool is built to automate validating and applying [.editorconfig](http://editorconfig.org/)
|
||||||
|
rules against files and directories.
|
||||||
|
|
||||||
|
It is built in Go, so installation is as simple as downloading one file and running it. It is also
|
||||||
|
super fast.
|
||||||
|
|
||||||
|
The features documented below all work, but some additonal features remain to be done
|
||||||
|
(see `docs/to-do.md`).
|
||||||
|
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
* Command `editorconfig-cli check [PATH]` - check if the files within `[PATH]` satisfy the rules
|
||||||
|
defined in `.editorconfig`. You can use this in a continuous integration process, like Jenkins,
|
||||||
|
to fail pull requests that don't satify the rules. Or you could use this in a Git pre-commit hook.
|
||||||
|
|
||||||
|
* Command `editorconfig-cli fix [PATH]` - fix the files within `[PATH]` to satify the rules.
|
||||||
|
|
||||||
* Command `editorconfig-cli ls [PATH]` - list the files found within `[PATH]` and the .editorconfig
|
* Command `editorconfig-cli ls [PATH]` - list the files found within `[PATH]` and the .editorconfig
|
||||||
files that would be applied to them.
|
files that would be applied to them.
|
||||||
|
|
||||||
* Command `editorconfig-cli rules [PATH]` - list the rules that would be applied to `[PATH]`.
|
* Command `editorconfig-cli rules [PATH]` - list the rules that would be applied to `[PATH]`.
|
||||||
|
|
||||||
@@ -14,6 +29,16 @@ needed!
|
|||||||
|
|
||||||
* It's open source.
|
* It's open source.
|
||||||
|
|
||||||
|
* It's super fast. The `check` command finishes small codebases in well under 1 second, and a 250k
|
||||||
|
line codebase is checked in under 3 seconds.
|
||||||
|
|
||||||
|
How to contribute
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
There is some work still to be done. Refer to the file `docs/to-do.md` for a list.
|
||||||
|
|
||||||
|
To run the tests, execute `bin/test`.
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|||||||
13
docs/to-do.md
Normal file
13
docs/to-do.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
* Test on Windows.
|
||||||
|
|
||||||
|
* Implement fixers and a `fix` command.
|
||||||
|
|
||||||
|
* Optimize speed and memory usage.
|
||||||
|
|
||||||
|
* Document how to install.
|
||||||
|
|
||||||
|
* The file pattern `{num1..num2}` is not fully implemented yet. See
|
||||||
|
`ConvertWildcardPatternToGoRegexp` in `path_matcher.go`
|
||||||
|
|
||||||
|
* Add an example of how to use the `check` command in a continuous integration build or in a Git
|
||||||
|
pre-commit hook.
|
||||||
@@ -16,16 +16,19 @@ func CreateCliApp() *cli.App {
|
|||||||
Name: "ls",
|
Name: "ls",
|
||||||
Usage: "List files that will be matched by the arguments you give",
|
Usage: "List files that will be matched by the arguments you give",
|
||||||
Action: LsCommand,
|
Action: LsCommand,
|
||||||
|
ArgsUsage: "[PATH1] [PATH2...]",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "rules",
|
Name: "rules",
|
||||||
Usage: "List rules that match a given file",
|
Usage: "List rules that match a given file",
|
||||||
Action: RulesCommand,
|
Action: RulesCommand,
|
||||||
|
ArgsUsage: "[PATH1] [PATH2...]",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "check",
|
Name: "check",
|
||||||
Usage: "Validate files",
|
Usage: "Validate files",
|
||||||
Action: CheckCommand,
|
Action: CheckCommand,
|
||||||
|
ArgsUsage: "[PATH1] [PATH2...]",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user