-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
and fix lint errors
Codecov Report
@@ Coverage Diff @@
## master #501 +/- ##
=========================================
Coverage 86.03% 86.03%
Complexity 704 704
=========================================
Files 266 266
Lines 3474 3474
Branches 376 376
=========================================
Hits 2989 2989
Misses 279 279
Partials 206 206
Continue to review full report at Codecov.
|
delete(fileTree("${projectDir}/node_modules/moment/locale") { | ||
include("*.js") | ||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain what was the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the classical newbie mistake. The code inside the closure configures the task, and is always run, whatever task you execute. I only want to delete when the task is executed, and the deletion must thus be inside a doLast
block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, I introduced a bug. This task is of type Delete, and the delete method here configures what needs to be deleted. I missed the fact that is a was a Delete task, and thought I was talking project.delete(), which does delete immediately. So the code was correct from the start.
@@ -9,7 +9,7 @@ | |||
"test": "ng test --code-coverage --no-progress --no-watch", | |||
"bundlesize": "bundlesize", | |||
"codecov": "codecov", | |||
"lint": "ng lint", | |||
"lint": "ng lint > tslint-result.txt", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why we output to a file? It removes the logs in the console right? Couldn't that be a reporter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK, there is no other way to have it generate a file (see angular/angular-cli#4959). I want a file to be generated otherwise gradle can't mark the task up-to-date. If it has been run before and nothing has changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get it. I now remember that I use tslint directly in ng2ninja to output to a file https://github.com/Ninja-Squad/ng2ninja/blob/master/src/tslint.ts#L9
and fix lint errors