navigation

Lint

Namespace: FSharpLint.Application
Parent: FSharpLint.Application

Provides an API for running FSharpLint from within another application.


Declared Types
Type Description
BuildFailure
ConfigurationParam
Context
LintFailure

Reason for the linter failing.

LintResult

Result of running the linter.

OptionalLintParameters

Optional parameters that can be provided to the linter.

ParsedFileInformation

If your application has already parsed the F# source files using FSharp.Compiler.Services you want to lint then this can be used to provide the parsed information to prevent the linter from parsing the file again.

ProjectProgress

Provides information on what the linter is currently doing.


Values and Functions
Name Description
runAstNodeRules

Signature: RuleMetadata [] -> GlobalRuleConfig -> FSharpCheckFileResults option -> string -> string -> string [] -> Node [] -> LintWarning [] * Context

Runs all rules which take a node of the AST as input.

runLineRules

Signature: LineRules -> GlobalRuleConfig -> string -> string -> string [] -> Context -> LintWarning []

Runs all rules which take a line of text as input.

lintSolution

Signature: optionalParams:OptionalLintParameters -> solutionFilePath:string -> toolsPath:ToolsPath -> LintResult

Lints an entire F# solution by linting all projects specified in the .sln file.

lintProject

Signature: optionalParams:OptionalLintParameters -> projectFilePath:string -> toolsPath:ToolsPath -> LintResult

Lints an entire F# project by retrieving the files from a given path to the .fsproj file.

lintSource

Signature: optionalParams:OptionalLintParameters -> source:string -> LintResult

Lints F# source code.

lintParsedSource

Signature: optionalParams:OptionalLintParameters -> parsedFileInfo:ParsedFileInformation -> LintResult

Lints F# source code that has already been parsed using FSharp.Compiler.Services in the calling application.

lintFile

Signature: optionalParams:OptionalLintParameters -> filePath:string -> LintResult

Lints an F# file from a given path to the .fs file.

lintParsedFile

Signature: optionalParams:OptionalLintParameters -> parsedFileInfo:ParsedFileInformation -> filePath:string -> LintResult

Lints an F# file that has already been parsed using FSharp.Compiler.Services in the calling application.