Project

General

Profile

Actions

Bug #40686

closed

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

Added by Patrick Seidensal almost 5 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
Testing & QA
Target version:
% Done:

100%

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

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*) $ ..

Actions #1

Updated by Patrick Seidensal almost 5 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Patrick Seidensal almost 5 years ago

  • Status changed from In Progress to Fix Under Review
  • % Done changed from 0 to 90
  • Pull request ID set to 28916
Actions #3

Updated by Ricardo Marques almost 5 years ago

  • Status changed from Fix Under Review to Resolved
  • Target version set to v15.0.0
Actions #4

Updated by Patrick Seidensal over 4 years ago

  • % Done changed from 90 to 100
Actions #5

Updated by Ernesto Puerta about 3 years ago

  • Project changed from mgr to Dashboard
  • Category changed from 151 to Testing & QA
Actions

Also available in: Atom PDF