flake8
-
reviewboard/diffviewer/views.py (Diff revision 1) Show all issues
JSHint
-
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 1) Col: 27 Missing semicolon.
-
Review Request #10125 — Created Aug. 23, 2018 and submitted
Information | |
---|---|
brennie | |
Review Board | |
release-4.0.x | |
|
|
10126 | |
c643e35... | |
Reviewers | |
reviewboard | |
The diffviewer now displays the list of commit messages and authors and
they are updated when the selected revision changes. Currently the
commit list doesn't support interdiffs and an error message is
displayed instead. This will be addressed in a future patch.
Description | From | Last Updated |
---|---|---|
Typo in the description: "commist" -> "commit" |
|
|
F401 'reviewboard.diffviewer.features.dvcs_feature' imported but unused |
![]() |
|
Col: 27 Missing semicolon. |
![]() |
|
Col: 14 'testRows' was used before it was defined. |
![]() |
|
Leftover debug output. |
|
|
This can easily be in alphabetical order. (While that doesn't always make things better in CSS -- width and height, … |
|
|
Swap these. |
|
|
Alphabetical order for these selectors. |
|
|
This is using a trailing comma, but this file isn't a .es6.js. Can you rename the file? |
|
|
Can you add a constant for the max length, and then compute the two numbers from that? |
|
|
I'd prefer to be explicit and not use the shorthand. Especially when we're having to be explicit for other values … |
|
|
Missing docs. |
|
|
Missing a trailing comma. |
|
|
interview? :) |
|
|
Wrong number of spaces for indentation. |
|
|
Extra blank line. |
|
|
Alphabetical order. |
|
|
Can you be more explicit in the TODO? |
|
|
Can you split out the template parameters so it's consistent with other calls in the codebase and easier to update? … |
|
|
As above, I'd prefer being explicit with a key: value form. |
|
|
Here, too. |
|
|
Technically this is a jQuery.Event. Same below. |
|
|
Extra blank line. |
|
|
Extra blank line. |
|
|
We need to explicitly use function() with Jasmine instead of =>, as this matters. |
|
|
Blank line between these. |
|
|
No blank line here. |
|
|
function(), not () =>. Same with all others in the tests in this change. |
|
|
No need for </div>. |
|
|
No need to define to null. |
|
|
Can you use the explicit expanded form? Same below. |
|
|
No spaces within the {}. This file is inconsistent on this. Same with all below. |
|
|
Missing trailing comma. |
|
|
Missing trailing comma. |
|
|
No need for the default value. |
|
|
Comma before "if any." |
|
|
Missing docs. |
|
|
If we can avoid this form, we should. It ends up being unnecessarily expensive, since it doesn't really add anything … |
|
|
Can you put this in alphabetical order? |
|
|
In sync how? Given the length and need for more details, this can use {% comment %}...{% endcomment %}. |
|
|
Two blank lines on either side. |
|
|
Should be Model Attributes. |
|
|
boolean |
|
|
Model Attribute. |
|
|
Can you explain what needs to be kept in sync? |
|
|
Multi-line comments should be in /* .. */ format. |
|
|
Kinda looks wrong. Let's do: $content = $(tableTemplate({ ... })) .append(...) |
|
|
boolean |
|
|
Typo: "attribtues" -> "attributes". |
|
|
Needs to be .call instead of .apply if not passing a list of arguments. |
|
|
Alphabetical order. |
|
|
This defaults to an empty list, but the other view defaults to None. We should be consistent to avoid issues … |
|
|
Still need two blank lines. |
|
|
Let's be explicit, especially since we are in the two cases above. |
|
|
No spaces immediately within {..} |
|
|
No spaces immediately within {..} |
|
|
No spaces immediately within {..} |
|
|
These templates are all using 2 spaces for indentation in the HTML, but they should use 1 like all other … |
|
|
Alphabetical order. |
|
|
Alphabetical order. |
|
|
Can you check isEmpty() instead? |
|
|
Col: 34 Missing semicolon. |
![]() |
|
Col: 34 Missing semicolon. |
![]() |
|
Col: 34 Missing semicolon. |
![]() |
|
Can we put the expression in parens? |
|
|
You don't need to use the $() around headerTemplate--you can just append the HTML. |
|
|
Same here. |
|
|
We should probably also do e.stopPropagation() |
|
|
We should probably also do e.stopPropagation() |
|
|
Needs "Args:" now. |
|
reviewboard/diffviewer/views.py (Diff revision 1) |
---|
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 1) |
---|
Col: 27 Missing semicolon.
Address issues
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+692 -132) |
Add test case
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+707 -132) |
reviewboard/static/rb/css/pages/diffviewer.less (Diff revision 3) |
---|
This can easily be in alphabetical order. (While that doesn't always make things better in CSS -- width and height, for instance, should usually go together -- it's worth doing here.)
reviewboard/static/rb/css/pages/diffviewer.less (Diff revision 3) |
---|
Alphabetical order for these selectors.
reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js (Diff revision 3) |
---|
This is using a trailing comma, but this file isn't a
.es6.js
. Can you rename the file?
reviewboard/static/rb/js/diffviewer/models/diffCommit.es6.js (Diff revision 3) |
---|
Can you add a constant for the max length, and then compute the two numbers from that?
reviewboard/static/rb/js/diffviewer/models/diffCommit.es6.js (Diff revision 3) |
---|
I'd prefer to be explicit and not use the shorthand. Especially when we're having to be explicit for other values in the dictionary.
reviewboard/static/rb/js/diffviewer/models/diffCommit.es6.js (Diff revision 3) |
---|
Missing a trailing comma.
reviewboard/static/rb/js/diffviewer/models/diffCommitListModel.es6.js (Diff revision 3) |
---|
interview? :)
reviewboard/static/rb/js/diffviewer/models/diffCommitListModel.es6.js (Diff revision 3) |
---|
Wrong number of spaces for indentation.
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 3) |
---|
Extra blank line.
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 3) |
---|
Alphabetical order.
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 3) |
---|
Can you be more explicit in the TODO?
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 3) |
---|
Can you split out the template parameters so it's consistent with other calls in the codebase and easier to update? One line per variable.
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 3) |
---|
As above, I'd prefer being explicit with a
key: value
form.
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 3) |
---|
Technically this is a
jQuery.Event
.Same below.
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 3) |
---|
Extra blank line.
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 3) |
---|
Extra blank line.
reviewboard/static/rb/js/models/reviewRequestEditorModel.es6.js (Diff revision 3) |
---|
Comma before "if any."
reviewboard/static/rb/js/pages/views/diffViewerPageView.es6.js (Diff revision 3) |
---|
If we can avoid this form, we should. It ends up being unnecessarily expensive, since it doesn't really add anything beyond what we could do before and just expands to a bunch of otherwise useless code (in this usage).
reviewboard/templates/reviews/commit_list_field.html (Diff revision 3) |
---|
In sync how?
Given the length and need for more details, this can use
{% comment %}...{% endcomment %}
.
addressed Christian's feedback
Description: |
|
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
|||||||||||||||
Diff: |
Revision 4 (+747 -132) |
reviewboard/static/rb/js/diffviewer/models/diffCommit.es6.js (Diff revision 4) |
---|
Two blank lines on either side.
reviewboard/static/rb/js/diffviewer/models/diffCommit.es6.js (Diff revision 4) |
---|
Should be
Model Attributes
.
reviewboard/static/rb/js/diffviewer/models/diffCommitListModel.es6.js (Diff revision 4) |
---|
Model Attribute
.
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 4) |
---|
Can you explain what needs to be kept in sync?
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 4) |
---|
Multi-line comments should be in
/* .. */
format.
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 4) |
---|
Kinda looks wrong. Let's do:
$content = $(tableTemplate({ ... })) .append(...)
reviewboard/static/rb/js/models/reviewRequestEditorModel.es6.js (Diff revision 4) |
---|
Typo: "attribtues" -> "attributes".
reviewboard/static/rb/js/pages/views/diffViewerPageView.es6.js (Diff revision 4) |
---|
Needs to be
.call
instead of.apply
if not passing a list of arguments.
Addressed feedback.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+757 -133) |
The code is good. There's just a few inconsistencies within the new code that I want to address.
reviewboard/diffviewer/views.py (Diff revision 5) |
---|
This defaults to an empty list, but the other view defaults to
None
. We should be consistent to avoid issues down the road.
reviewboard/static/rb/js/diffviewer/models/diffCommit.es6.js (Diff revision 5) |
---|
Still need two blank lines.
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 5) |
---|
Let's be explicit, especially since we are in the two cases above.
Addressed feedback.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 6 (+758 -133) |
commitId -> commitID
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 7 (+758 -133) |
commitId -> commitID
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 8 (+758 -133) |
Make sure to use lowerPascalCase for
$.data
.
Fix issues from rerere
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 9 (+759 -133) |
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 9) |
---|
This can just be
<p>
.
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 9) |
---|
Alphabetical order.
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 9) |
---|
Alphabetical order.
reviewboard/static/rb/js/pages/views/diffViewerPageView.es6.js (Diff revision 9) |
---|
Can you check
isEmpty()
instead?
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 9) |
---|
These templates are all using 2 spaces for indentation in the HTML, but they should use 1 like all other HTML-based templates.
Addressed feedback.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 10 (+759 -133) |
Add more JS tests
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 11 (+690 -133) |
oops
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 12 (+834 -133) |
Add more tests
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 13 (+1565 -704) |
reviewboard/static/rb/js/pages/views/tests/diffViewerPageViewTests.es6.js (Diff revision 13) |
---|
Col: 34 Missing semicolon.
Quotes
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 14 (+1565 -704) |
reviewboard/static/rb/js/pages/views/tests/diffViewerPageViewTests.es6.js (Diff revision 14) |
---|
Col: 34 Missing semicolon.
Quotes
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 15 (+1565 -704) |
reviewboard/static/rb/js/pages/views/tests/diffViewerPageViewTests.es6.js (Diff revision 15) |
---|
Col: 34 Missing semicolon.
Addressed jshint issues.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 16 (+1565 -704) |
reviewboard/static/rb/js/diffviewer/models/diffCommitModel.es6.js (Diff revision 16) |
---|
Can we put the expression in parens?
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 16) |
---|
You don't need to use the
$()
aroundheaderTemplate
--you can just append the HTML.
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 16) |
---|
We should probably also do
e.stopPropagation()
reviewboard/static/rb/js/diffviewer/views/diffCommitListView.es6.js (Diff revision 16) |
---|
We should probably also do
e.stopPropagation()
reviewboard/static/rb/js/pages/views/diffViewerPageView.es6.js (Diff revision 16) |
---|
Needs "Args:" now.
Addressed feedback.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 17 (+1575 -704) |
rebase off /r/10186/
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 18 (+1575 -704) |