Skip to content

Commit

Permalink
fix formatting of errors during rule
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAfroOfDoom committed Jan 14, 2024
1 parent 67d1eb2 commit 50288c2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/datapack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,16 @@ jobs:
with:
distribution: 'temurin'
java-version: '17'

- name: Download server files
run: |
curl -o server.jar $FABRIC_SERVER
mkdir mods
curl -o mods/fabric-api.jar $FABRIC_API
curl -o mods/packtest.jar $PACKTEST
- name: Copy packs to world
run: |
mkdir -p world
cp -r datapacks world
- name: Run test server
run: |
java -Xmx2G -Dpacktest.auto -jar server.jar nogui
2 changes: 2 additions & 0 deletions .github/workflows/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ jobs:
run: yarn start lint.scripts.eslint.check
- name: Run custom lint scripts on non-datapacks, non-resourcepack files
run: yarn start lint.custom.other
env:
FORCE_COLOR: 2
3 changes: 2 additions & 1 deletion package-scripts/linting-rules/ticketize-todos.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ const ticketizeTodos = (file) => {
const expectedTodoFormat = chalk.blueBright('TODO(<ticket>):');
const formattedLineNumber = chalk.bold(`line ${lineNumber}`);
const formattedFullLine = chalk.red(line);
const formattedTodo = chalk.yellow(todo);

let error = `invalid TODO format on ${formattedLineNumber}:`;
error += `'${todo}'. TODOs must be of the form ${expectedTodoFormat}`;
error += ` '${formattedTodo}'. TODOs must be of the form ${expectedTodoFormat}`;
error += `\n\t\t full line: ${formattedFullLine}`;

errors.push(error);
Expand Down

0 comments on commit 50288c2

Please sign in to comment.