Project

General

Profile

Bug #40686

mgr/dashboard: Add a linter for closing tags in Angular templates

Added by Patrick Seidensal 5 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Category:
dashboard/qa
Target version:
Start date:
07/08/2019
Due date:
% Done:

100%

Source:
Tags:
low-hanging-fruit
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

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 5 months ago

  • Status changed from New to In Progress

#2 Updated by Patrick Seidensal 5 months ago

  • Status changed from In Progress to Need Review
  • % Done changed from 0 to 90
  • Pull request ID set to 28916

#3 Updated by Ricardo Marques 4 months ago

  • Status changed from Need Review to Resolved
  • Target version set to v15.0.0

#4 Updated by Patrick Seidensal 3 months ago

  • % Done changed from 90 to 100

Also available in: Atom PDF