Skip to content

Commit 48d6b11

Browse files
authored
Merge pull request #380 from luojiyin1987/fix/typo-cleanups
Fix spelling mistakes in comments, changelog, and test fixtures
2 parents d1fdeb7 + ac69fad commit 48d6b11

17 files changed

Lines changed: 20 additions & 20 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Other than the above, there are some notable UX changes:
3838
- A [Git mergetool mode](https://github.com/nixos/nixfmt?tab=readme-ov-file#git-mergetool) is now supported.
3939
- CLI changes:
4040
- In stdin-mode, `--filename <path>` can now be used to specify a filename for diagnostics.
41-
- Number of indendation spaces can now be configured using `--indent <number>`
41+
- Number of indentation spaces can now be configured using `--indent <number>`
4242

4343
## 0.6.0 -- 2023-10-31
4444

main/System/IO/Atomic.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ withOutputFile path act = transact begin commit rollback $ \(tpath, th) -> do
4343
begin :: IO (FilePath, Handle)
4444
begin = openTempFileWithDefaultPermissions tmpDir tmpTemplate
4545

46-
-- TODO: Support for non-unix platofrms.
46+
-- TODO: Support for non-unix platforms.
4747
-- TODO: Preserve ctime?
4848
-- TODO: Preserve extended attributes (ACLs, ...)?
4949
copyAttributes :: (FilePath, Handle) -> IO ()

src/Nixfmt/Predoc.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ textWidth = Text.length
400400

401401
-- | Attempt to fit a list of documents in a single line of a specific width.
402402
-- ni — next indentation. Only used for trailing comment calculations. Set this to the indentation
403-
-- of the next line relative to the current one. So usuall 2 when the indentation level increases, 0 otherwise.
403+
-- of the next line relative to the current one. So usually 2 when the indentation level increases, 0 otherwise.
404404
-- c — allowed width
405405
fits :: Int -> Int -> Doc -> Maybe Text
406406
fits _ c _ | c < 0 = Nothing

src/Nixfmt/Pretty.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ moveParamsComments
352352
[ ParamAttr name maybeDefault (Just (comma{preTrivia = []})),
353353
ParamEllipsis (ellipsis{preTrivia = trivia <> trivia'})
354354
]
355-
-- Inject a trailing comma on the last element if nessecary
355+
-- Inject a trailing comma on the last element if necessary
356356
moveParamsComments [ParamAttr name@Ann{sourceLine} def Nothing] = [ParamAttr name def (Just (ann sourceLine TComma))]
357357
moveParamsComments (x : xs) = x : moveParamsComments xs
358358
moveParamsComments [] = []

src/Nixfmt/Types.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ instance Eq Parameter where
203203
&& cmp l2 r2
204204
&& l3 == r3
205205
where
206-
-- Compare two lists of paramters, but for the last argument don't compare whether or not there is a trailing comma
206+
-- Compare two lists of parameters, but for the last argument don't compare whether or not there is a trailing comma
207207
cmp [] [] = True
208208
cmp [ParamAttr x1 x2 _] [ParamAttr y1 y2 _] = x1 == y1 && x2 == y2
209209
cmp (x : xs) (y : ys) = x == y && cmp xs ys

test/diff/idioms_lib_5/in.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ let
6262

6363
isMarkedInsecure = attrs: (attrs.meta.knownVulnerabilities or []) != [];
6464

65-
# Alow granular checks to allow only some unfree packages
65+
# Allow granular checks to allow only some unfree packages
6666
# Example:
6767
# {pkgs, ...}:
6868
# {
@@ -218,7 +218,7 @@ let
218218
219219
however ${getName attrs} only has the outputs: ${builtins.concatStringsSep ", " actualOutputs}
220220
221-
and is missing the following ouputs:
221+
and is missing the following outputs:
222222
223223
${lib.concatStrings (builtins.map (output: " - ${output}\n") missingOutputs)}
224224
'';

test/diff/idioms_lib_5/out-pure.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ let
7878

7979
isMarkedInsecure = attrs: (attrs.meta.knownVulnerabilities or [ ]) != [ ];
8080

81-
# Alow granular checks to allow only some unfree packages
81+
# Allow granular checks to allow only some unfree packages
8282
# Example:
8383
# {pkgs, ...}:
8484
# {
@@ -254,7 +254,7 @@ let
254254
255255
however ${getName attrs} only has the outputs: ${builtins.concatStringsSep ", " actualOutputs}
256256
257-
and is missing the following ouputs:
257+
and is missing the following outputs:
258258
259259
${lib.concatStrings (builtins.map (output: " - ${output}\n") missingOutputs)}
260260
'';

test/diff/idioms_lib_5/out.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ let
7878

7979
isMarkedInsecure = attrs: (attrs.meta.knownVulnerabilities or [ ]) != [ ];
8080

81-
# Alow granular checks to allow only some unfree packages
81+
# Allow granular checks to allow only some unfree packages
8282
# Example:
8383
# {pkgs, ...}:
8484
# {
@@ -254,7 +254,7 @@ let
254254
255255
however ${getName attrs} only has the outputs: ${builtins.concatStringsSep ", " actualOutputs}
256256
257-
and is missing the following ouputs:
257+
and is missing the following outputs:
258258
259259
${lib.concatStrings (builtins.map (output: " - ${output}\n") missingOutputs)}
260260
'';

test/diff/idioms_pkgs_5/in.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ else let
380380
# Derivations set it to choose what sort of machine could be used to
381381
# execute the build, The build platform entirely determines this,
382382
# indeed more finely than Nix knows or cares about. The `system`
383-
# attribute of `buildPlatfom` matches Nix's degree of specificity.
383+
# attribute of `buildPlatform` matches Nix's degree of specificity.
384384
# exactly.
385385
inherit (stdenv.buildPlatform) system;
386386

test/diff/idioms_pkgs_5/out-pure.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ let
514514
# Derivations set it to choose what sort of machine could be used to
515515
# execute the build, The build platform entirely determines this,
516516
# indeed more finely than Nix knows or cares about. The `system`
517-
# attribute of `buildPlatfom` matches Nix's degree of specificity.
517+
# attribute of `buildPlatform` matches Nix's degree of specificity.
518518
# exactly.
519519
inherit (stdenv.buildPlatform) system;
520520

0 commit comments

Comments
 (0)