Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mgr/dashboard: Add linter for unclosed HTML tags #28916

Merged
merged 2 commits into from
Jul 16, 2019

Conversation

p-se
Copy link
Contributor

@p-se p-se commented Jul 8, 2019

Adds html-hint to the npm run lint command and hence, it's automatically added to run-frontend-unit-test.sh, which is called on pull request creation. Ensures closed HTML tags. It found the issue spotted by @s0nea.

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

Fixes: http://tracker.ceph.com/issues/40686

Signed-off-by: Patrick Nawracay pnawracay@suse.com

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Copy link
Contributor

@alfonsomthd alfonsomthd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Fixes: http://tracker.ceph.com/issues/40686

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
@ricardoasmarques
Copy link
Contributor

jenkins retest this please

@ricardoasmarques
Copy link
Contributor

jenkins test make check

@ricardoasmarques
Copy link
Contributor

ricardoasmarques commented Jul 15, 2019

@p-na make check is failing due to a missing </div>:

/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/crushmap/crushmap.component.html
�[37m      L32 |�[90m�[39m
�[37m           ^ �[31mTag must be paired, missing: [ </div> ], open tag match failed [ <div class="row"> ] on line 1. (tag-pair)�[39m

Scanned 125 files, found 1 errors in 1 files (367 ms)

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
Copy link
Contributor

@ricardoasmarques ricardoasmarques left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ricardoasmarques ricardoasmarques merged commit 78e580b into ceph:master Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants