I noticed there’s an issue tracing the problem, [SONARHTML-162] - Jira, and was closed with fix version 3.7.
My html plugin version is 3.7.1, but it still reports a bug when there’s ‘<’ in template node and ’ >’ in script node. It’s quite inconvenient since arrow function is used frequently.
Product Used:
sonar-scanner-4.6.2.2472-linux
sonarqube 9.9.2.77730
plugin version:
key "web"
name "HTML Code Quality and Security"
description "Code analyzer for HTML"
version "3.7.1 (build 3306)"
license "The Apache Software License, Version 2.0"
organizationName "SonarSource and Matthijs Galesloot"
editionBundled false
homepageUrl "http://redirect.sonarsource.com/plugins/web.html"
issueTrackerUrl "https://jira.sonarsource.com/browse/SONARHTML"
implementationBuild "d720acc6860c6d8b69ec4d17570a398a1e216da1"
filename "sonar-html-plugin-3.7.1.3306.jar"
hash "60cad36e58d0b0503105ff91a6ec5c1b"
sonarLintSupported true
documentationPath "static/documentation.md"
updatedAt 1703756749891
type "BUNDLED"
Language used: Vue.js 3 / Javascript
Affected Rule: Web:S4645
A </script>
was found without a relating opening <script>
tag. This may be caused by nested script tags.
Code Sample:
filename: checker.vue
<template>
<div class="container">
<section>
<CheckerSearch v-model="searchValue" @search="handleSearch" :disabled='searchValue.length<1' />
</section>
</div>
</template>
<script>
setTimeout(() => { })
</script>
or
<template>
<div class="container">
<section>
<CheckerSearch v-model="searchValue" @search="handleSearch" :disabled='searchValue.length<1' />
</section>
</div>
</template>
<script>
// >
</script>