https://github.com/piotrmurach/queen
English language linter to hold your files in high esteem.
https://github.com/piotrmurach/queen
checker english linter quality ruby rubygem
Last synced: 11 months ago
JSON representation
English language linter to hold your files in high esteem.
- Host: GitHub
- URL: https://github.com/piotrmurach/queen
- Owner: piotrmurach
- License: mit
- Created: 2017-12-23T14:36:04.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-08-09T22:00:30.000Z (over 3 years ago)
- Last Synced: 2024-05-01T23:00:11.746Z (almost 2 years ago)
- Topics: checker, english, linter, quality, ruby, rubygem
- Language: Ruby
- Size: 29.3 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Queen
[][gem]
[][travis]
[][appveyor]
[][codeclimate]
[][coverage]
[][inchpages]
[gem]: http://badge.fury.io/rb/queen
[travis]: http://travis-ci.org/piotrmurach/queen
[appveyor]: https://ci.appveyor.com/project/piotrmurach/queen
[codeclimate]: https://codeclimate.com/github/piotrmurach/queen/maintainability
[coverage]: https://coveralls.io/github/piotrmurach/queen?branch=master
[inchpages]: http://inch-ci.org/github/piotrmurach/queen
> **Queen** is an English langauge linter that reports on spelling, grammar, and other crimes against the written word, and will help you hold your code and comments in high esteem.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'queen'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install queen
## Usage
Running the `queen` command with no arguments will check all source files in the current directory:
```
$ queen
```
Alternatively, you can `specify` a list of files and/or directories to be scanned, like so:
```
$ queen lib spec file.rb
```
For example, let's assume the following sentence by Freddie Mercury:
```ruby
class Freddie
def say
"I'm just a musical prostitute, my dear."
end
end
```
After **Queen** reviews the file (named `freddie.rb`), the following reprimands are given:
```
Reviewing 1 file
Reprimands:
freddie.rb:3:25: prostitute may be viewed as offensive. Consider removing this word.
1 file checked, 1 reprimand given.
```
To see all available commands add `-h` or `--help` flag:
```
$ queen -h (--help)
```
| Command flag | Description |
|---------------|-------------|
| --[no-]color | Force color output on or off. |
| -d/--debug | Change log level to DEBUG. |
| -o/--out | Write output to a file instead of stdout. |
| -r/--require | Require Ruby file. |
| --verbose | Change log level to VERBOSE. |
| -v/--version | Display the current version and exit. |
## Configuration
All **Queen** rules are enabled by default and can be configured in `.queen.yml` file. Default configuration:
```ruby
---
rules:
profanity:
enabled: true
exclude: []
spelling:
enabled: true
exclude: []
```
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/piotrmurach/queen. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## Copyright
Copyright (c) 2017-2018 Piotr Murach. See LICENSE for further details.