fsprojects / fsprojects/FSharpLint

Wording of lint warnings

Open
#181 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
F#
Stars
327
Forks
74
PR merge metrics
No merged PRs in 30d

Description

Currently the descriptions of the rules are far from perfect, community feedback and proposals to help improve them would be amazing, this is the place to do it! The location of the format strings in the project is here, and below in a more readable table:

Warning Warning Message Proposed Message
RulesCanBeReplacedWithComposition Lambda may be able to be replaced with composition. e.g. `fun x -> x > isValid
RulesFailwithfWithArgumentsMatchingFormatString failwithf has more arguments than were found in its format string, these further arguments will be ignored by the compiler.
RulesFailwithWithSingleArgument failwith should have a single argument, further arguments will be ignored by the compiler.
RulesFavourIgnoreOverLetWildError The ignore function is usually favoured over let _ = ... when ignoring the result of an expression.
RulesHintRefactor {0} might be able to be refactored into {1}.
RulesHintSuggestion {0}; suggestion: {1}.
RulesInvalidArgWithTwoArguments invalidArg should have two arguments, further arguments will be ignored by the compiler.
RulesInvalidOpWithSingleArgument invalidOp should have a single argument, further arguments will be ignored by the compiler.
RulesNamingConventionsCamelCaseError Consider changing {0} to camelCase.
RulesNamingConventionsExceptionError Consider changing {0} to be suffixed with 'Exception'.
RulesNamingConventionsInterfaceError Consider changing {0} to be prefix with 'I'.
RulesNamingConventionsPascalCaseError Consider changing {0} to PascalCase.
RulesNamingConventionsUnderscoreError Consider changing {0} to remove any underscores.
RulesNestedStatementsError Code suggested not to be nested more deeply than a depth of {0}.
RulesNullArgWithSingleArgument nullArg should have a single argument, further arguments will be ignored by the compiler.
RulesNumberOfItemsBooleanConditionsError Conditions suggested to contain at most {0} boolean operators.
RulesNumberOfItemsClassMembersError Class suggested to have a maximum of {0} members.
RulesNumberOfItemsFunctionError Functions suggested to have a maximum of {0} parameters.
RulesNumberOfItemsTupleError Tuple suggested to have a maximum of {0} items.
RulesRaiseWithSingleArgument raise should have a single argument, further arguments will be ignored by the compiler.
RulesReimplementsFunction If {0} has no mutable arguments partially applied then the lambda can be removed.
RulesSourceLengthError {0} was {2} lines long, suggested to be less than {1} lines long.
RulesTupleOfWildcardsError A tuple of wildcards in a pattern can be replaced with a single wildcard. {0} can be replaced with {1}.
RulesTypographyFileLengthError File suggested to be less than {0} lines long.
RulesTypographyLineLengthError Line suggested to be less than {0} characters long.
RulesTypographyTabCharacterError Consider replacing tab (\t) with spaces.
RulesTypographyTrailingLineError Found trailing whitespace line at end of file.
RulesTypographyTrailingWhitespaceError Found trailing whitespace at end of line.
RulesUselessBindingError Binding appears to have no purpose.
RulesWildcardNamedWithAsPattern Unnecessary wildcard named using the as pattern, the wildcard can be removed e.g. _ as x replaced with x.
RulesXmlDocumentationAutoPropertyError Auto property {0} suggested to have xml documentation.
RulesXmlDocumentationEnumError Enum {0} suggested to have xml documentation.
RulesXmlDocumentationExceptionError Exception type suggested to have xml documentation.
RulesXmlDocumentationLetError Let binding suggested to have xml documentation.
RulesXmlDocumentationMemberError Member suggested to have xml documentation.
RulesXmlDocumentationModuleError Module suggested to have xml documentation.
RulesXmlDocumentationRecordError Record field {0} suggested to have xml documentation.
RulesXmlDocumentationTypeError Type suggested to have xml documentation.
RulesXmlDocumentationUnionError Union case {0} suggested to have xml documentation.

Please add a comment or make a pull request if you would like to see changes to the descriptions of the warnings

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The warning format strings are in src/FSharpLint.Core/Text.resx; start by reviewing the listed entries and existing wording conventions. Propose clearer replacements for the messages in the issue table, then submit the agreed wording in a pull request. Done means the selected warning descriptions are updated in Text.resx and match the accepted proposals.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
tooling
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.