Skip to content

Commit

Permalink
chore: clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
magic-akari committed Jul 28, 2024
1 parent 6d96927 commit 6da2bc1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/clang-format-cli.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env node
#!/usr/bin/env node
import { existsSync, readFileSync } from "node:fs";
import { readFile, writeFile } from "node:fs/promises";
import path from "node:path";
Expand Down Expand Up @@ -67,7 +67,7 @@ const { values, positionals, tokens } = parseArgs({
},
verbose: {
type: "boolean",
}
},
},
});

Expand Down Expand Up @@ -264,7 +264,9 @@ format_range: {

for (const [file_no, file] of fileNames.entries()) {
if (values.verbose) {
console.error(`Formatting [${file_no + 1}/${fileNames.length}] ${file}`);
console.error(
`Formatting [${file_no + 1}/${fileNames.length}] ${file}`,
);
}
const content = await get_file_or_stdin(file);
const formatted = format(content, file, get_style(file));
Expand Down

0 comments on commit 6da2bc1

Please sign in to comment.