-
-
Notifications
You must be signed in to change notification settings - Fork 294
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
In .vue
files //
comments are not counted, only /* */
and <!-- -->
ones are.
To Reproduce
- Create
test.vue
with the following content:
<script setup lang="ts">
// Comment slash-slash
const b = 3 + 5;
/* Comment slash-star */
const qq = b + 4;
</script>
<template>
<!-- Comment html -->
<button class="one">Push me!</button>
</template>
<style lang="scss" scoped>
/* stylelint-disable selector-class-pattern */
.one {
background: red;
color: blue; // Example
}
</style>
- on the command line do:
scc --ci --no-cocomo test.vue
- The result is:
-------------------------------------------------------------------------------
Language Files Lines Blanks Comments Code Complexity
-------------------------------------------------------------------------------
Vue 1 22 5 3 14 0
-------------------------------------------------------------------------------
Total 1 22 5 3 14 0
-------------------------------------------------------------------------------
Processed 373 bytes, 0.000 megabytes (SI)
-------------------------------------------------------------------------------
Expected behavior
Expect comment count to be 5.
Desktop (please complete the following information):
- OS: Windows 11 64 bits
- scc version 3.1.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working