Skip to content

Commit 8d2c986

Browse files
author
Rhys Koedijk
committed
Fix for "LF will be replaced by CRLF the next time Git touches it" causing incorrect detection of misspellings
1 parent a7694a3 commit 8d2c986

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

task/services/codespellRunner.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ export class CodespellRunner {
2323
}
2424

2525
debug("Codespell was not found, installing via `pip install`...");
26-
const pipRunner: ToolRunner = tool(which("pip", true));
27-
pipRunner.arg(["install", "codespell", "chardet"]);
26+
const pipRunner: ToolRunner = tool(which("pip", true)).arg([
27+
"install", "codespell", "chardet"
28+
]);
2829
pipRunner.execSync({
2930
silent: !this.debug
3031
});
@@ -142,8 +143,9 @@ export class CodespellRunner {
142143

143144
// Get locally modified file paths
144145
private async getModifiedFilePaths(): Promise<string[]> {
145-
const git: ToolRunner = tool(which("git", true));
146-
git.arg(["diff", "--name-only"]);
146+
const git: ToolRunner = tool(which("git", true)).arg([
147+
"diff", "--name-only", "--ignore-cr-at-eol", "--ignore-space-at-eol"
148+
]);
147149
const result = await git.execSync({
148150
silent: !this.debug
149151
});

0 commit comments

Comments
 (0)