General Advice on Setup & Resolving Issues

Hi,

My current setup is as follows:

  • ALM used: GitHub
  • CI system used: GitHub Actions
  • Scanner command used: mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
  • Languages of the repository: Vue.JS/TS/JS (frontend), Java (backend)

I have a parent pom which delegates to the frontend pom that specifies the sources and my tsconfig for the frontend (I get a lot of false positives due to it not reading Vue.JS properly or my TS version (3.9.7).
Lots of issues like this:

<big>"<strong>" and "<em>" tags should be used</big>

Iā€™m fine with marking these as false positives and resolving them, but then I find that if I merge that feature branch into my integration branch, they pop up again, and then when I release and push to master the same thing happens.

When I am scanning feature/bugfix branches I am using the following:
mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.branch.name=$branch -Dsonar.branch.target=development

development is my integration branch. When I am scanning this branch I use:
mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.branch.name=development -Dsonar.branch.target=master

And finally when I scan master I use:
mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar

Both development & master are long lived branches, the rest are short-lived.
From all my reading this is the way to set it up but for some reason already fixed issues tend to pop up again in future branches. Is there a setting somewhere I have overlooked? Any help would be much appreciated.

Also, if there is a better way to do my scanning or set it up I am all ears. Currently both frontend/backend exist in the same repository hence why Iā€™ve set it up this way but Iā€™m not adverse to maybe changing it if there is benefit in doing so.

Thanks,
Terry

Hi @tsposato ,

Vue.JS and TS are part of the languages and frameworks supported by our products.
I suggest to open another forum thread, describing your Vue.JS and TS configuration and versions.
Someone specialist of the support of JS/TS may be able to improve that support and solve the root problem.
Please use the javascript, typescript, github-actions and maven tags to help routing the thread to the right team, and include the logs produced by the Scanner during analysis.

About the main issue of that thread, does the development branch match the ā€œlong-lived branch patternā€ in the SonarCloud UI? (Administration > Branches & Pull Requests, the pattern is shown at the top right corner of the page).
A screen shot of the Administration > Branches & Pull Requests page may help, with the main branch, the development branch, 1 feature branch affected by the issue and the pattern. All private details can be masked.

So far, I didnā€™t succeed in reproducing the issue, it seems I am not aware of some important configuration implied here. Could you please try to build a public reproducer and share the link of the SonarCloud project link here?

1 Like

Hi @Claire_Villard ,

I will create another threat for my JS/TS issues after I resolve my core issue.
As requested here is a screenshot of my branches & PRā€™s:


As you can see, the master branch here has a status of failed, however when we merge our PRā€™s into development branch we ensure all outstanding sonar items/issues are resolves. This includes a bunch of the Vue issues which we resolve as false positives. Once I merge the development branch into master, the same issues are then raised again and if I want to have it as Green and Passed the developers need to manually go and resolve them again.

Maybe this is due to the TS/JS configuration problem and I should work on resolving that first?
The issues are all Vue/JS/TS related, here is a snippet of them:


There is definitely a chance I have set it up incorrectly, but from the docs that I have found everything looks good from my end. Happy for you to point me in the right direction.

Iā€™ve attached the sonar logs as well just in case they shed some light on the issue.
sonar-logs.txt (15.3 KB)
Thanks.

Hi,

At first glance, the branch configuration seems fine. I tried to reproduce using the same parameters on one of my test projects, and the issues did not reappeared, so I have the feeling it may be connected to the problem with Vue.

To confirm that, if you close an issue on a Java file on a feature branch, does it reappear once merged on the long branch?

Hi,

It does look like that the issue is only the frontend components. I can confirm that issues closed or resolved in our PR/development branches on Java files donā€™t reappear on the master branch. The issues that reappear currently are in .vue or .scss files. I did see this ticket that got resolved recently - https://jira.sonarsource.com/browse/MMF-1441 - I wonder if this may have something to do with it?

I did re-run a scan of our master branch which didnā€™t change anything but maybe Iā€™m reading that ticket wrong and my issue is potentially something different.

Hi,

Thanks for the confirmation the issue is limited to frontend files.

This ticket you found implements the support of the Vue.JS single file components (SFC). Are you using that feature on your project?
This feature is available on SonarCloud since Feb 15th, did you notice some change before/after that date?

I notice several parsing errors in the scanner logs:

[INFO] Sensor TypeScript analysis [javascript]
[INFO] Deploying custom rules bundle jar:file:/home/runner/.sonar/cache/f2d4f3985cfdc8a536978941e81bc342/sonar-securityjsfrontend-plugin.jar!/js-vulnerabilities-rules-1.0.0.tgz to /home/runner/work/project/project/target/sonar/.sonartmp/eslint-bridge-bundle/package/custom-rules466951565167290432
[INFO] Using /home/runner/work/project/project/frontend/tsconfig.json from sonar.typescript.tsconfigPath property
[INFO] 107 source files to be analyzed
[INFO] Analyzing 107 files using tsconfig: /home/runner/work/project/project/frontend/tsconfig.json
Error:  Failed to parse file [frontend/src/components/ReceiverDetails/DeliveryDetails.vue] at line 31: Unexpected token (7:33)
Error:  Failed to parse file [frontend/src/components/ReceiverDetails/ReceiverTimeSlots.vue] at line 46: Unexpected token (11:41)
Error:  Failed to parse file [frontend/src/components/Item/ReferenceForm.vue] at line 19: Unexpected token (7:18)
[INFO] 18/107 files analyzed, current file: frontend/src/components/ConfirmActionModal/ConfirmActionModal.vue
Error:  Failed to parse file [frontend/src/components/DatePicker/DatePicker.vue] at line 25: Unexpected token (6:36)
Error:  Failed to parse file [frontend/src/components/Alert/Alert.vue] at line 32: Unexpected token (8:36)
[INFO] 53/107 files analyzed, current file: frontend/src/components/ClientSelect/ClientSelect.vue
Error:  Failed to parse file [frontend/src/components/SuburbFormInput/SuburbFormInput.vue] at line 54: Unexpected token, expected "," (26:19)
Error:  Failed to parse file [frontend/src/components/CustomEmail/CustomEmailForm.vue] at line 164: Missing semicolon (35:28)
[INFO] 84/107 files analyzed, current file: frontend/src/components/ManifestDataTable/ManifestDataTable.vue
[INFO] 107/107 source files have been analyzed
[INFO] Sensor TypeScript analysis [javascript] (done) | time=39831ms

Have those files something special?

Hi,

Yes we do use Vue.JS SFC. Those files do have some of those. Is there something we need to turn on or change to enable it or will it be automatic? I still see those errors in the logs since Feb 15th.

Hello @tsposato,

Since February 15, SonarCloud uses SonarJS 7.2, which introduced the support of TypeScript code inside Vue.js Single File Components. One consequence of this novelty is that JavaScript code inside Vue.js file is now parsed with TypeScript compiler to benefit from type information and analysed with TypeScript rules, including type-aware ones.

Now that Vue.js files are considered as TypeScript code, issues on such files that used to be resolved (back when it was considered JavaScript code) could reappear. This is an unfortunate but temporary side-effect of introducing the support of TypeScript analysis in Vue.js Single File Components. Given your branching setup, such issues may pop-up occasionally but you can expect to see this side-effect eventually vanish. However, if the aforementioned pattern keeps popping up over time (letā€™s after a few weeks), then the problem might be outside of SonarJSā€™s scope. Please come back to us if this is still the case.

Coming to the parsing errors that were reported in the logs, it would be interesting to check on your side whether those errors were already there before SonarJS 7.2, in other word before February 15. Regardless of the outcome, we still need to understand the reason behind these parsing errors. Your code may be using some non-standard syntax. In that regard, we would need from you a minimal code reproducer taken from one of these failing files so that we can investigate further.

Hope this helps,
Yassin

2 Likes

Hi @Yassin,

I know that we definitely do use Vue.JS Single File Components so I will monitor these carefully from now on to see if bugs/smells that we resolve continue to pop up in our long lives branches once we merge.

Most of the ā€˜Failed to parse fileā€™ errors looks like they are due to lines begining with ā€˜@Propā€™ within a ā€˜scriptā€™ block.

DeliveryDetails.vue:
@Prop({ default: '' }) private notes: string

ReceiverTimeSlots.vue:
@Prop({ default: new Date() }) private dispatchDate: Date

ReferenceForm.vue:
@Prop() private reference: Reference

If needed I can go into more detail and attach the full files that are failing to parse, just let me know.
It seems like most are false positives or errors in the scanning as the app compiles/runs and it working.

Thanks.

Hello again,

Thank you for the additional information. Unfortunately, I was not able to reproduce the parsing errors with the @Prop decorator you suspected to be the cause. My guess is that the problem lies elsewhere. Therefore, I would really appreciate if you can attach the full files that are failing to parse.

Best,
Yassin

Hi @Yassin,

Iā€™ve attached the files here for you.

Regards,
Terry

Sonar-failed-parses.zip (7.1 KB)

We are still seeing issues being created on our master branch after a merge from development, even though our development branch is reporting green. They are all in scss and vue files. It did drop from previous so Iā€™m hoping that they will continue to decline until eventually this doesnā€™t occur anymore.

Is there something else I can check to ensure everything is working correctly?
Also, has there been any updates on the failed parsing of our source files?

Hello @tsposato,

Thank you for sharing these files, and sorry for the delay. I finally managed to reproduce the parsing errors youā€™re encountering after tweaking a bit the parsing phase of the analyzer.

I will start the explanation with some context. Under the hood, we use typescript-eslint parser which relies on TypeScript compiler and babel-parser to parse JS/TS code. When the former fails, the later takes over. Speaking from experience, typescript-eslint parser fails to parse a file without syntactic errors because of some configuration in the provided tsconfig.

After some investigation, it seems to me that typescript-eslint parser (TypeScript compiler in other words) fails to parse TS code in your Vue.js components. I suspect the cause to coming from some configuration in your tsconfig.json file (maybe something related to the compiler options).

To prove my point, I was able to analyse without parsing errors your vue.js files without a tsconfig as well as with a rudimentary one that just enumerates the .vue files. Then there is probably a compiler option or something else in your tsconfig.json file that makes TypeScript compiler fail to parse your code.

I would gladly have a look at your tsconfig if you donā€™t mind sharing it.

Yassin

Hi @Yassin,

That is interesting. Iā€™ve attached my tsconfig.json file here as per your request.

tsconfig.json (728 Bytes)

Terry

Hello Terry,

Sorry for the long delay.

We identified the cause of these failures and consequently created a ticket that we will address as soon as possible. In the meantime, you can use the following temporary workaround:

.vue files must be specified in the "files" property of the tsconfig.json file.

Please let me know if the problem persists even with the workaround.

Regards,
Yassin

Hi Yassin,

It seems the problem is worse now. Iā€™m not sure how I need to structure the files section is tsconfig.json. Itā€™s not really feasible to add each .vue file here is it?

See my current logs:

[INFO] Analyzing 148 files using tsconfig: /home/runner/work/harbour/harbour/frontend/tsconfig.json
[INFO] 148 source files to be analyzed
Error:  Failed to analyze file [frontend/src/components/ReceiverDetails/DeliveryDetails.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/ReceiverDetails/DeliveryDetails.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/RulesFeesModal/TailgateRulesFees.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/RulesFeesModal/TailgateRulesFees.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/ClientForm/ClientForm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/ClientForm/ClientForm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/ConsignmentDataTable/ConsignmentDataTable.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/ConsignmentDataTable/ConsignmentDataTable.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/CustomerCarrier/CustomerCarrierTable.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/CustomerCarrier/CustomerCarrierTable.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/ReceiverDetails/ReceiverTimeSlots.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/ReceiverDetails/ReceiverTimeSlots.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/views/Consignment/Consignment.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/views/Consignment/Consignment.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/Item/ItemForm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/Item/ItemForm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/RegistrationConfirm/RegistrationConfirm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/RegistrationConfirm/RegistrationConfirm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/DangerousGood/DangerousGoodPanel.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/DangerousGood/DangerousGoodPanel.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/views/Consignment/ConsignmentList.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/views/Consignment/ConsignmentList.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/Item/ReferenceForm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/Item/ReferenceForm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/views/Login/Login.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/views/Login/Login.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/CustomItemFormModal/CustomItemFormModal.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/CustomItemFormModal/CustomItemFormModal.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/ConfirmActionModal/ConfirmActionModal.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/ConfirmActionModal/ConfirmActionModal.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/AddressSelect/AddressSelect.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/AddressSelect/AddressSelect.vue.
The file must be included in at least one of the projects provided.
[INFO] 28/148 files analyzed, current file: frontend/src/components/EmailTemplate/EmailTemplateForm.vue
Error:  Failed to analyze file [frontend/src/components/EmailTemplate/EmailTemplateForm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/EmailTemplate/EmailTemplateForm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/DatePicker/DatePicker.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/DatePicker/DatePicker.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/views/Manifest/ManifestList.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/views/Manifest/ManifestList.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/RulesFeesModal/PalletRulesFees.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/RulesFeesModal/PalletRulesFees.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/Settings/Settings.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/Settings/Settings.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/AddCustomerCarrierModal/TransferForm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/AddCustomerCarrierModal/TransferForm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/Alert/Alert.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/Alert/Alert.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/CustomerCarrierAccount/CustomerCarrierAccountPanel.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/CustomerCarrierAccount/CustomerCarrierAccountPanel.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/AddressForm/AddressForm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/AddressForm/AddressForm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/TimeSlotPicker/TimeSlotPicker.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/TimeSlotPicker/TimeSlotPicker.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/RulesFeesModal/ResidentialRulesFees.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/RulesFeesModal/ResidentialRulesFees.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/CustomerCarrierAccount/CustomerCarrierAccountTable.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/CustomerCarrierAccount/CustomerCarrierAccountTable.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/UserFormModal/UserFormModal.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/UserFormModal/UserFormModal.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/views/Consignment/EditConsignment.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/views/Consignment/EditConsignment.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/AddressBulkModal/AddressBulkModal.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/AddressBulkModal/AddressBulkModal.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/views/Home/Home.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/views/Home/Home.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/StatusSelect/StatusSelect.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/StatusSelect/StatusSelect.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/views/Consignment/DefaultConsignment.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/views/Consignment/DefaultConsignment.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/CustomerSelect/CustomerSelect.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/CustomerSelect/CustomerSelect.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/AddressDataTable/AddressDataTable.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/AddressDataTable/AddressDataTable.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/AddressFormModal/AddressFormModal.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/AddressFormModal/AddressFormModal.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/CustomerForm/CustomerForm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/CustomerForm/CustomerForm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/UserList/UserList.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/UserList/UserList.vue.
The file must be included in at least one of the projects provided.
[INFO] 63/148 files analyzed, current file: frontend/src/main.ts
Error:  Failed to analyze file [frontend/src/components/AddCustomerCarrierAccountModal/AddCustomerCarrierAccountModal.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/AddCustomerCarrierAccountModal/AddCustomerCarrierAccountModal.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/ConsignmentSummaryModal/ConsignmentSummaryModal.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/ConsignmentSummaryModal/ConsignmentSummaryModal.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/AddPrefix/AddPrefixModal.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/AddPrefix/AddPrefixModal.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/ClientSelect/ClientSelect.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/ClientSelect/ClientSelect.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/CustomItem/CustomItemPanel.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/CustomItem/CustomItemPanel.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/PasswordUpdater/PasswordUpdaterForm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/PasswordUpdater/PasswordUpdaterForm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/DangerousGood/DangerousGoodForm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/DangerousGood/DangerousGoodForm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/ManageCustomerModal/ManageCustomerModal.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/ManageCustomerModal/ManageCustomerModal.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/ConsignmentTypePicker/ConsignmentTypePicker.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/ConsignmentTypePicker/ConsignmentTypePicker.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/RulesFeesModal/CartonRulesFees.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/RulesFeesModal/CartonRulesFees.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/AddCustomerCarrierModal/DIFOTForm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/AddCustomerCarrierModal/DIFOTForm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/CustomerList/CustomerList.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/CustomerList/CustomerList.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/views/AddressBook/AddressBook.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/views/AddressBook/AddressBook.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/views/Consignment/ThirdPartyConsignment.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/views/Consignment/ThirdPartyConsignment.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/AddCustomerCarrierModal/AddCustomerCarrierModal.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/AddCustomerCarrierModal/AddCustomerCarrierModal.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/RulesFeesModal/GenericRulesFees.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/RulesFeesModal/GenericRulesFees.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/views/Default/Default.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/views/Default/Default.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/ClientCarrierAccountModal/ClientCarrierAccountModal.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/ClientCarrierAccountModal/ClientCarrierAccountModal.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/RoleSelect/RoleSelect.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/RoleSelect/RoleSelect.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/PreferredUnitsForm/PreferredUnitsForm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/PreferredUnitsForm/PreferredUnitsForm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/SuburbFormInput/SuburbFormInput.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/SuburbFormInput/SuburbFormInput.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/ServiceNamesPanel/ServiceNamesPanel.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/ServiceNamesPanel/ServiceNamesPanel.vue.
The file must be included in at least one of the projects provided.
[INFO] 106/148 files analyzed, current file: frontend/src/helpers/AddressHelpers.ts
Error:  Failed to analyze file [frontend/src/components/SenderAddressForm/SenderAddressForm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/SenderAddressForm/SenderAddressForm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/Item/ItemPanel.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/Item/ItemPanel.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/ManifestDataTable/ManifestDataTable.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/ManifestDataTable/ManifestDataTable.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/RateCardFormModal/RateCardFormModal.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/RateCardFormModal/RateCardFormModal.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/CustomItem/CustomItemDataTable.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/CustomItem/CustomItemDataTable.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/Item/ReferenceContainer.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/Item/ReferenceContainer.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/AddCustomerCarrierAccountModal/CustomerCarrierAccountForm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/AddCustomerCarrierAccountModal/CustomerCarrierAccountForm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/ManageClientModal/ManageClientModal.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/ManageClientModal/ManageClientModal.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/AddCustomerCarrierModal/CustomerCarrierForm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/AddCustomerCarrierModal/CustomerCarrierForm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/ClientReportingModal/ClientReportingModal.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/ClientReportingModal/ClientReportingModal.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/RulesFeesModal/OversizeRulesFees.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/RulesFeesModal/OversizeRulesFees.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/RulesFeesModal/RulesFeesModal.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/RulesFeesModal/RulesFeesModal.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/ItemDropdown/ItemDropdownPanel.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/ItemDropdown/ItemDropdownPanel.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/views/ClientCarrierAccount/ClientCarrierAccountView.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/views/ClientCarrierAccount/ClientCarrierAccountView.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/views/Client/ClientView.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/views/Client/ClientView.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/RulesFeesModal/ManualHandlingRulesFees.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/RulesFeesModal/ManualHandlingRulesFees.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/AddPrefix/PrefixForm.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/AddPrefix/PrefixForm.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/Header/Header.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/Header/Header.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/views/ErrorPage/ErrorPage.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/views/ErrorPage/ErrorPage.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/Sidebar/Sidebar.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/Sidebar/Sidebar.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/SettingsTab/SettingsTab.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/SettingsTab/SettingsTab.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/components/CustomerCarrierList/CustomerCarrierList.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/CustomerCarrierList/CustomerCarrierList.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/views/Consignment/ReturnConsignment.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/views/Consignment/ReturnConsignment.vue.
The file must be included in at least one of the projects provided.
[INFO] 145/148 files analyzed, current file: frontend/src/components/Carrier/CarrierPanel.vue
Error:  Failed to analyze file [frontend/src/components/Carrier/CarrierPanel.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/components/Carrier/CarrierPanel.vue.
The file must be included in at least one of the projects provided.
Error:  Failed to analyze file [frontend/src/App.vue]: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: frontend/src/App.vue.
The file must be included in at least one of the projects provided.
[INFO] 148/148 source files have been analyzed
[INFO] Sensor TypeScript analysis [javascript] (done) | time=42966ms
[INFO] Sensor ThymeLeaf template sensor [securityjavafrontend]
[INFO] Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=1ms
[INFO] ------------- Run sensors on module freightmate-harbour
[INFO] JavaScript/TypeScript frontend is enabled
[INFO] Sensor CSS Rules [cssfamily]
[INFO] No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
[INFO] Sensor CSS Rules [cssfamily] (done) | time=1ms
[INFO] Sensor C# Project Type Information [csharp]
[INFO] Sensor C# Project Type Information [csharp] (done) | time=0ms
[INFO] Sensor C# Properties [csharp]
[INFO] Sensor C# Properties [csharp] (done) | time=0ms
[INFO] Sensor JavaXmlSensor [java]
[INFO] 1 source file to be analyzed
[INFO] 1/1 source file has been analyzed
[INFO] Sensor JavaXmlSensor [java] (done) | time=9ms
[INFO] Sensor HTML [web]
[INFO] Sensor HTML [web] (done) | time=0ms
[INFO] Sensor XML Sensor [xml]
[INFO] 1 source file to be analyzed
[INFO] 1/1 source file has been analyzed
...

Regards,
Terry

We are also facing the same issue. Is there any work around?.

Please do post the work around if any.

Strange thing is few our projects .vue files got analyzed by sonar with the same configuration.

Our tsconfig.json file looks like this,
tsconfig.json (820 Bytes)

Hey @Yassin ,

weā€™re having the same issues like @Jedesh and tsposato.

Any news on this?

Adding every .vue file in tsconfig.json in the ā€œfilesā€ works as a workaround

Hello @tsposato, @Jedesh, @illmat,

A fix was implemented and released recently. It is available in latest SonarQube 8.9.1.44547 and on SonarCloud. Therefore, you no longer need to use the workaround I mentioned above.

Regards,
Yassin

3 Likes

@Yassin Thanks.