amperser / proselint

A linter for prose.
http://proselint.com
BSD 3-Clause "New" or "Revised" License
4.34k stars 178 forks source link

Extract rules from the Just Say No plugin #830

Open dylan-k opened 6 years ago

dylan-k commented 6 years ago

https://github.com/lexicalunit/linter-just-say-no/blob/master/resources/hedges.cson

KVGarg commented 5 years ago

Hi @dylan-k , i would like to work on this issue. Could you please guide me, what actually i have to do? Do i have to make a separate file for this or create a new folder in checks folder?

dylan-k commented 5 years ago

@CO16326Keshav I would suggest a new folder, as it seems each folder in 'checks' is for a different sort of edit. Hedges seem to be a thing distinct from the others, so I think a new folder makes the most sense.

KVGarg commented 5 years ago

ok @dylan-k , I will try to work on this issue

joshmgrant commented 5 years ago

Also look at the tests/ folder for examples of how each check is tested. You can replicate some of the tests for this case.

KVGarg commented 5 years ago

ok @joshmgrant , i will take a look on that tests/ folder

KVGarg commented 5 years ago

@dylan-k @joshmgrant Since there can be multiple hedges terms in input text, so i thought to convert to that text to sentences and accordingly if any sentence has one or more hedges terms, then the error message will be displayed according to the number of hedges terms. Should i do this way or output all the hedges terms in input text individually instead of combining them together ?

dylan-k commented 5 years ago

It sounds to me like the individual approach would be more likely to catch all the hedges, right?

KVGarg commented 5 years ago

Yeah, when all hedges words are printed individually, then each have its own column number in output but when i try to output multiple hedges terms in a sentence it outputs only the column number of first hedge word that it encountered in the sentence.

Multiple Hedges terms in a sentence - Output Format screenshot 31

Individual Hedges terms - Output Format screenshot 32

KVGarg commented 5 years ago

@dylan-k which output format is looking more appropriate according to you from above pics that i have attached in mu last comment ?

dylan-k commented 5 years ago

I would vote for the format that says "Possible hedge word: {word}"

KVGarg commented 5 years ago

ok @dylan-k , i will make a pull request with that output format with new test file added for this check and updated readme.md with newly added rule in the table