Skip to content
This repository has been archived by the owner on Mar 21, 2021. It is now read-only.

Sonar analyze: component, update, details not covered #431

Open
1 task
pascalgrimaud opened this issue Jul 25, 2019 · 10 comments
Open
1 task

Sonar analyze: component, update, details not covered #431

pascalgrimaud opened this issue Jul 25, 2019 · 10 comments
Labels
bug Something isn't working $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $100 https://www.jhipster.tech/bug-bounties/

Comments

@pascalgrimaud
Copy link
Member

Overview of the issue

When launching Sonar Analyze, under Sonar, these files are not covered:

  • component.ts
  • update.component.ts
  • details.component.ts

When we use npm test, it seems to be covered

I'll update the template later if needed

Motivation for or Use Case
Reproduce the error
Related issues
Suggest a Fix
JHipster Version(s)
JHipster configuration
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
  • Checking this box is mandatory (this is just to show you read everything)
@pascalgrimaud pascalgrimaud added the bug Something isn't working label Jul 25, 2019
@pascalgrimaud
Copy link
Member Author

I'm adding a bounty on this, as it is really important for us, in our current project with @nonomoho
So if someone can help

@pascalgrimaud pascalgrimaud added $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $100 https://www.jhipster.tech/bug-bounties/ labels Jul 25, 2019
@atomfrede
Copy link
Member

You mean the update and details components for entities, right? For me it looks like they are also not covered when doing npm test, although there is unit test for that.

image

@pascalgrimaud
Copy link
Member Author

yes exactly @atomfrede it's for entities

but I remember I saw the same thing yesterday for health too:

  • health.service.ts is covered
  • health.component.ts not
    Both got spec.ts

@atomfrede
Copy link
Member

Yes. .component.ts are nowhere to find in the coverage reports also there is a spec for that which is executed. Very strange indeed.

@vishal423
Copy link
Contributor

You can find their coverage under corresponding .vue files like user-management-edit.vue contains the coverage of JhiUserManagementEdit.

@vishal423
Copy link
Contributor

I think it's related to SonarSource/SonarTS#477

@pascalgrimaud
Copy link
Member Author

Oh thanks @vishal423
We can see @sahbi-ktifa already answered to the ticket lol

@atomfrede atomfrede mentioned this issue Jan 7, 2020
@stonedMoose
Copy link

In a project I'm working on we use only .vue files without distinct .component.ts files. And our sonar analysis has the correct coverage information.

Could we consider to use only .vue files to fix this issue ?

@pascalgrimaud
Copy link
Member Author

Using only .vue file for fixing this Sonar Analyze is not a good idea.
We split into TS file, to be consistent with Angular part, and it will probably help to migrate to Vue 3.

There is already an opened ticket for that: https://jira.sonarsource.com/browse/MMF-1441
So the real issue is on their side.

@qmonmert
Copy link
Contributor

qmonmert commented Aug 5, 2020

Using only .vue file for fixing this Sonar Analyze is not a good idea.
We split into TS file, to be consistent with Angular part, and it will probably help to migrate to Vue 3.

There is already an opened ticket for that: https://jira.sonarsource.com/browse/MMF-1441
So the real issue is on their side.

@pascalgrimaud it seems that it is not a priority for them :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $100 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

No branches or pull requests

5 participants