Bug #40686
mgr/dashboard: Add a linter for closing tags in Angular templates
Status:
Resolved
Priority:
Normal
Assignee:
Category:
Testing & QA
Target version:
% Done:
100%
Source:
Tags:
low-hanging-fruit
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Description
An issue with an unclosed tag has been found and fixed. The tool we currently use, `html-linter`, was not capable of finding that issue and the documentation refers to a configuration file which does not seem to support finding such issues. There's a tool that did find it, though, called `html-hint`. `html-hint` is more vidid (when compared with html-linter by weekly downloads on npm) but seems to have a slightly different focus. I therefore recommend to integrate `html-hint` in addition to `html-linter` in `run-frontend-unit-tests.sh`. The integration in `run-frontend-uni-tests.sh` will ensure that such errors can not sneak into our code anymore.
user@home ~/src/ceph-4/src/pybind/mgr/dashboard/frontend (wip-pna-fix-tag*) $ npx htmlhint -r tag-pair src/app /home/user/src/ceph-4/src/pybind/mgr/dashboard/frontend/src/app/app.component.html L9 | ^ Tag must be paired, missing: [ </block-ui></block-ui> ], open tag match failed [ <block-ui> ] on line 8. (tag-pair) Scanned 121 files, found 1 errors in 1 files (146 ms) user@home ~/src/ceph-4/src/pybind/mgr/dashboard/frontend (wip-pna-fix-tag*) $ ..
History
#1 Updated by Patrick Seidensal over 4 years ago
- Status changed from New to In Progress
#2 Updated by Patrick Seidensal over 4 years ago
- Status changed from In Progress to Fix Under Review
- % Done changed from 0 to 90
- Pull request ID set to 28916
#3 Updated by Ricardo Marques over 4 years ago
- Status changed from Fix Under Review to Resolved
- Target version set to v15.0.0
#4 Updated by Patrick Seidensal over 4 years ago
- % Done changed from 90 to 100
#5 Updated by Ernesto Puerta almost 3 years ago
- Project changed from mgr to Dashboard
- Category changed from 151 to Testing & QA