Skip to content

Commit

Permalink
Merge pull request #162 from nojaf/empty-fsc-args
Browse files Browse the repository at this point in the history
Raise clear error if empty FSC arguments were passed.
  • Loading branch information
nojaf committed Nov 14, 2023
2 parents a2c018f + 49d5938 commit 3bfca03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed
* [Raise clear error if empty FSC arguments were passed](https://github.com/ionide/FSharp.Analyzers.SDK/pull/162) (thanks @nojaf!)

## [0.20.1] - 2023-11-14

### Fixed
Expand Down
5 changes: 5 additions & 0 deletions src/FSharp.Analyzers.Cli/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ let runFscArgs
(globs: Glob list)
(mappings: SeverityMappings)
=
if String.IsNullOrWhiteSpace fscArgs then
printError "Empty --fsc-args were passed!"
exit 1
else

let fscArgs = fscArgs.Split(';', StringSplitOptions.RemoveEmptyEntries)

let sourceFiles =
Expand Down

0 comments on commit 3bfca03

Please sign in to comment.