Skip to content

Commit

Permalink
TypeScript: Fail just a little faster.
Browse files Browse the repository at this point in the history
  • Loading branch information
petervdonovan committed Jan 9, 2022
1 parent 15fffaa commit 2db4f92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions org.lflang/src/org/lflang/generator/ts/TSGenerator.kt
Expand Up @@ -159,6 +159,10 @@ class TSGenerator(
"Code generation complete. Collecting dependencies...", IntegratedBuilder.GENERATED_PERCENT_PROGRESS
)
if (shouldCollectDependencies(context)) collectDependencies(resource, context)
if (errorsOccurred()) {
context.unsuccessfulFinish();
return;
}
if (targetConfig.protoFiles.size != 0) {
protoc()
} else {
Expand Down
2 changes: 1 addition & 1 deletion org.lflang/src/org/lflang/generator/ts/TSValidator.kt
Expand Up @@ -104,7 +104,7 @@ class TSValidator(
codeMap.lfSourcePaths().forEach {
val lfStart = codeMap.adjusted(it, message.start)
val lfEnd = codeMap.adjusted(it, message.end)
if (!lfStart.equals(Position.ORIGIN)) {
if (!lfStart.equals(Position.ORIGIN)) { // Ignore linting errors in non-user-supplied code.
errorReporter.report(
message.severity,
DiagnosticReporting.messageOf(message.message, genPath, message.start),
Expand Down

0 comments on commit 2db4f92

Please sign in to comment.