Closed jonathan-terrell closed 2 weeks ago
Actually it should be true to all rules. All comments should be ignored by the rule reporter.
So I changed the issue title.
Something slightly related. @David-Pena what do you think adding a new rule what checks the amount of comments. I guess we have to discuss it on discord,.
it should be released tomorrow
Describe the bug Detector does not ignore comments. In my case it identified the word 'if' within a comment as an 'if' statement and as a result reported a cyclomatic complexity error ("Cyclomatic complexity is high (6)").
To Reproduce Run the detector on the following comment:
// Dependencies - Framework import '@/assets/main.scss'; // Global application styles. import { initTranslations } from '@/locales'; import router from '@/router'; import { handleError, initAppMonitor } from '@/globals';
// Dependencies - Component import App from '@/App.vue'; // Root component.
// Application - Initialise try { // Create a new Vue application instance and register plugins. const application = createApp(App); // Create the main Vue instance using the root component. application.use(createPinia()); // Register Pinia for centralized state management. 'useMainStore' in 'src/stores/mainStore.ts' is then available for use. application.use(VueQueryPlugin); // Register Vue Query for managing data fetching, caching, and synchronization. application.use(router); // Register the router instance to handle navigation.
} catch (error) { handleError(error, { locator: 'Application Initialisation [main.1]' }); // Report error during initialisation. }