Skip to content

Commit 510357a

Browse files
Core: apply suggestions from code review
Applied some code style suggestions by @xperiandri. Co-authored-by: Andrii Chebukin <XperiAndri@Outlook.com>
1 parent 660a50a commit 510357a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/FSharpLint.Core/Rules/Conventions/Binding/TupleOfWildcards.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ let private checkTupleOfWildcards fileContents pattern identifier identifierRang
1717
let constructorName = identifier |> String.concat "."
1818
let arguments = Array.create numberOfWildcards "_" |> String.concat ", "
1919
if numberOfWildcards = 1 then
20-
sprintf "%s _" constructorName
20+
$"%s{constructorName} _"
2121
else
22-
sprintf "%s(%s)" constructorName arguments
22+
$"%s{constructorName}(%s{arguments})"
2323

2424
match pattern with
2525
| SynPat.Tuple(_isStruct, patterns, _, range) when List.length patterns > 1 && patterns |> List.forall isWildcard ->

src/FSharpLint.Core/Rules/Conventions/FunctionReimplementation/CanBeReplacedWithComposition.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ let private validateLambdaCannotBeReplacedWithComposition fileContents _ lambda
2525
| (ExpressionUtilities.Identifier(idents, _))::appliedValues
2626
when appliedValuesAreConstants appliedValues ->
2727

28-
let funcName = String.Join(".", idents)
28+
let funcName = String.Join('.', idents)
2929
let funcStringParts =
3030
Seq.append
3131
(Seq.singleton funcName)
3232
(appliedValues
3333
|> Seq.take (appliedValues.Length - 1)
3434
|> Seq.choose (fun value -> ExpressionUtilities.tryFindTextOfRange value.Range fileContents))
35-
let funcString = String.Join(" ", funcStringParts)
35+
let funcString = String.Join(' ', funcStringParts)
3636

3737
match getLastElement appliedValues with
3838
| SynExpr.Ident(lastArgument) when calledFunctionIdents.Length > 1 ->

0 commit comments

Comments
 (0)