Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dzencot committed Jul 2, 2024
1 parent a795b8d commit 7eea3e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ check:
run-fix:
docker run --rm \
-v ./fixtures:/content \
-v ./bin:/usr/local/bin \
-v ./bin:/LanguageTool-6.3/bin \
-v ./src:/LanguageTool-6.3/src \
hexlet/languagetool-cli \
node ./bin/fix.js
Expand Down
2 changes: 1 addition & 1 deletion bin/fix.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { fix } from '../src/index.js';

exec('sh /LanguageTool-6.3/start.sh >/dev/null 2>&1 &', () => setTimeout(() => {
const rules = process.argv.slice(2);
fix(rules).then(() => {
fix('/content', rules).then(() => {
console.log('------------------DONE-----------------');
});
}, 5000));
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ const checkTree = (source, rules) => {
return iter(source);
}

const fix = async (rules = []) => {
const filePaths = await getFilePaths();
const fix = async (dirPath, rules = []) => {
const filePaths = await getFilePaths(dirPath);
const promises = filePaths.map(async (fullpath) => {
const content = fs.readFileSync(fullpath, 'utf-8');
const fileName = fullpath.split('/').slice(2).join('/');
Expand Down

0 comments on commit 7eea3e9

Please sign in to comment.