Package: proselint
Writing is notoriously hard, even for the best writers, and it's not for lack of good advice — a tremendous amount of knowledge about the craft is strewn across usage guides, dictionaries, technical manuals, essays, pamphlets, websites, and the hearts and minds of great authors and editors. But poring over Strunk & White hardly makes one a better writer — it turns you into neither Strunk nor White. And nobody has the capacity to apply all the advice fromGarner’s Modern English Usage, an 1100-page usage guide, to everything they write. In fact, the whole notion that one becomes a better writer by reading advice on writing rests on untenable assumptions about learning and memory. The traditional formats of knowledge about writing are thus essentially inert, waiting to be transformed.We devised a simple solution:proselint, a linter for English prose. A linter is a computer program that, akin to a spell checker, scans through a file and detects issues — like how a real lint roller helps you get unwanted lint off of your shirt.proselintplaces the world's greatest writers and editors by your side, where they whisper suggestions on how to improve your prose. You’ll be guided by advice inspired by Bryan Garner, David Foster Wallace, Chuck Palahniuk, Steve Pinker, Mary Norris, Mark Twain, Elmore Leonard, George Orwell, Matthew Butterick, William Strunk, Elwyn White, Philip Corbett, Ernest Gowers, and the editorial staff of the world’s finest literary magazines and newspapers, among others. Our goal is to aggregate knowledge about best practices in writing and to make that knowledge immediately accessible to all authors in the form of a linter for prose; all in a neat command-line utility that you can integrate into other tools, scripts, and workflows.InstallationTo get this up and running, install it usingpip:pipinstallproselintFedorasudodnfinstallproselintDebiansudoaptinstallpython3-proselintUbuntusudoadd-apt-repositoryuniverse
sudoaptinstallpython3-proselintPlugins for other softwareproselintis available on:Ademo editorSublime TextAtom Editor(thanks toClay Miller).Emacs via Flycheck.Vim viaALEorSyntastic(thanks to @lcd047, @Carreau, andDaniel M. Capella)Phabricator'sarcCLI(thanks toJeff Verkoeyen)Danger(thanks toDavid GrandinettiandOrta Therox)Visual Studio Code(thanks toPatryk Peszko)coala(thanks to thecoala Development Group)IntelliJ(byVictor Kropp)pre-commit(byAndy Airey)StatickUsageSuppose you have a documenttext.mdwith the following text:John is very unique.You can runproselintover the document using the command line:proselinttext.mdThis prints a list of suggestions to stdout, one per line. Each suggestion has the form:text.md:<line>:<column>:<check_name><message>For example,text.md:0:10:wallace.uncomparablesComparisonofanuncomparable:'unique'cannotbecompared.The command-line utility can also print suggestions in JSON using the--jsonflag. In this case, the output is considerably richer:{
  // Type of check that output this suggestion.
  check: "wallace.uncomparables",

  // Message to describe the suggestion.
  message: "Comparison of an uncomparable: 'unique' cannot be compared.",

  // The person or organization giving the suggestion.
  source: "David Foster Wallace"

  // URL pointing to the source material.
  source_url: "http://www.telegraph.co.uk/a/9715551"

  // Line where the error starts.
  line: 0,

  // Column where the error starts.
  column: 10,

  // Index in the text where the error starts.
  start: 10,

  // Index in the text where the error ends.
  end: 21,

  // length from start -> end
  extent: 11,

  // How important is this? Can be "suggestion", "warning", or "error".
  severity: "warning",

  // Possible replacements.
  replacements: [
    {
      value: "unique"
    }
  ]
}To run the linter as part of another Python program, you can use thelintfunction inproselint.tools:importproselintsuggestions=proselint.tools.lint("This sentence is very unique")This will return a list of suggestions:[('weasel_words.very',"Substitute 'damn' every time you're inclined to write 'very;' your editor will delete it and the writing will be just as it should be.",0,17,17,22,5,'warning',None),('uncomparables.misc',"Comparison of an uncomparable: 'very unique.' is not comparable.",0,17,17,29,12,'warning',None)]ChecksYou can disable any of the checks by modifying$XDG_CONFIG_HOME/proselint/config. If$XDG_CONFIG_HOMEis not set or empty,~/.config/proselint/configwill be used. Additionally, for compatibility reasons, the legacy configuration~/.proselintrcwill be checked if$XDG_CONFIG_HOME/proselint/configdoes not exist.{"checks":{"typography.diacritical_marks":false}}IDDescriptionairlinese.miscAvoiding jargon of the airline industryannotations.miscCatching annotations left in the textarchaism.miscAvoiding archaic formscliches.hellAvoiding a common clichécliches.miscAvoiding clichésconsistency.spacingConsistent sentence spacingconsistency.spellingConsistent spellingcorporate_speak.miscAvoiding corporate buzzwordscursing.filthWords to avoidcursing.nflAvoiding words banned by the NFLdates_times.am_pmUsing the right form for the time of daydates_times.datesStylish formatting of dateshedging.miscNot hedginghyperbole.miscNot being hyperbolicjargon.miscAvoiding miscellaneous jargonlgbtq.offensive_termsAvoding offensive LGBTQ termslgbtq.termsMisused LGBTQ termslexical_illusions.miscAvoiding lexical illusionslinks.brokenLinking only to existing sitesmalapropisms.miscAvoiding common malapropismsmisc.apologizingBeing confidentmisc.back_formationsAvoiding needless backformationsmisc.bureaucrateseAvoiding bureaucratesemisc.butAvoid starting a paragraph with "But..."misc.capitalizationCapitalizing only what ought to be capitalizedmisc.chatspeakAvoiding lolling and other chatspeakmisc.commercialeseAvoiding jargon of the commercial worldmisc.currencyAvoiding redundant currency symbolsmisc.debasedAvoiding debased languagemisc.false_pluralsAvoiding false pluralsmisc.illogicAvoiding illogical formsmisc.inferior_superiorSuperior to, not thanmisc.latinAvoiding overuse of Latin phrasesmisc.many_aMany a singularmisc.metaconceptsAvoiding overuse of metaconceptsmisc.narcissismTalking about the subject, not its studymisc.phrasal_adjectivesHyphenating phrasal adjectivesmisc.preferred_formsMiscellaneous preferred formsmisc.pretensionAvoiding being pretentiousmisc.professionsCalling jobs by the right namemisc.punctuationUsing punctuation assiduouslymisc.scare_quotesUsing scare quotes only when neededmisc.suddenlyAvoiding the word suddenlymisc.tense_presentAdvice from Tense Presentmisc.waxedWaxing poeticmisc.whenceUsing "whence"mixed_metaphors.miscNot mixing metaphorsmondegreens.miscAvoiding mondegreenneedless_variants.miscUsing the preferred formnonwords.miscAvoid using nonwordsoxymorons.miscAvoiding oxymoronspsychology.miscAvoiding misused psychological termsredundancy.miscAvoiding redundancy and saying things twiceredundancy.ras_syndromeAvoiding RAS syndromeskunked_terms.miscAvoid using skunked termsspelling.able_atable-able vs. -atablespelling.able_ible-able vs. -iblespelling.athletesSpelling of athlete namesspelling.em_im_en_in-em vs. -im and -en vs. -inspelling.er_or-er vs. -orspelling.in_unin- vs. un-spelling.miscSpelling words corectlysecurity.credit_cardKeeping credit card numbers secretsecurity.passwordKeeping passwords secretsexism.miscAvoiding sexist languageterms.animal_adjectivesAnimal adjectivesterms.denizen_labelsCalling denizens by the right nameterms.eponymous_adjectivesCalling people by the right nameterms.veneryCall groups of animals by the right nametypography.diacritical_marksUsing dïacríticâl markstypography.exclamationAvoiding overuse of exclamationtypography.symbolsUsing the right symbolsuncomparables.miscNot comparing uncomparablesweasel_words.miscAvoiding weasel wordsweasel_words.veryAvoiding the word "very"ContributingInterested in contributing toproselint? Great — there are plenty of ways you can help. Read more onour website, where we describe how you can help us buildproselintinto the greatest writing tool in the world.Issue TrackerSource CodeSupportIf you run into a problem, pleaseopen an issuein or send an email tohello@amperser.com.Running Automated TestsAutomated tests are included in theproselint/testsdirectory. To run these tests locally, you can use./utils.LicenseThe project is licensed under the BSD license.