Skip to content

Commit

Permalink
Merge pull request #126 from ditrit/bugfix/parsing_i18n_key
Browse files Browse the repository at this point in the history
Update i18n key for parsing error
  • Loading branch information
Zorin95670 authored Aug 1, 2024
2 parents b005ee3 + 5767646 commit 827bded
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/parser/TerraformErrorListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TerraformErrorListener extends antlr4.error.ErrorListener {
endColumn: column + offendingSymbol.stop - offendingSymbol.start + 2,
severity: ParserLog.SEVERITY_ERROR,
path: this.file.path,
message: 'terrator-plugin.parser.error.parsing',
message: 'parser.error.parsing',
initialErrorMessage: msg,
}));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/resources/js/parserError.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const errors = [
startColumn: 1,
endLineNumber: 13,
endColumn: 7,
message: 'terrator-plugin.parser.error.parsing',
message: 'parser.error.parsing',
severity: ParserLog.SEVERITY_ERROR,
initialErrorMessage: 'extraneous input \'blabla\' expecting {<EOF>, \'terraform\', \'resource\', \'data\', \'output\', \'locals\', \'module\', \'variable\', \'provider\'}',
}),
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/parser/TerraformParser.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,15 +338,15 @@ describe('Test TerraformParser', () => {

parser.parse(new FileInformation({ path: '' }), [input]);
expect(metadata.pluginData.parseLogs
.find(({ message }) => message === 'terrator-plugin.parser.error.parsing'))
.find(({ message }) => message === 'parser.error.parsing'))
.toEqual(new ParserLog({
startLineNumber: 1,
startColumn: 37,
endLineNumber: 1,
endColumn: 38,
path: 'new_file.tf',
severity: ParserLog.SEVERITY_ERROR,
message: 'terrator-plugin.parser.error.parsing',
message: 'parser.error.parsing',
initialErrorMessage: 'extraneous input \'=\' expecting \'{\'',
}));
});
Expand Down

0 comments on commit 827bded

Please sign in to comment.