Fix FP S4670 "Unexpected unknown type selector 'markdown'"

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • how is SonarQube deployed: zip, Docker, Helm
  • what are you trying to achieve
  • what have you tried so far to achieve this

SonarQube version: * Data Center Edition

  • Version 9.9.1 (build 69595)

We are connecting our app to SonarQube via our internal application lifestyle management tool. We have a specific team that handles this, and I can inquire with them if anyone needs more information about how it’s deployed.

We are encountering numerous “Unexpected unknown type selector ‘markdown’” in our SCSS files. Here is an example of what we would use in the SCSS:

:host ::ng-deep h1 markdown p { margin : 0 em; }

We have to use markdown in our html in this format :

<markdown [data]="content?.headline"></markdown>

This is because we are grabbing our content from the content management system Tridion, and we have to use markdown to apply the styling we created in Tridion.

Any insight on how to fix this issue or bypass it via some rule exception would be greatly appreciated! Thanks!

Hi,

Welcome to the community!

Are you seeing this in the analysis logs as parsing errors, or as issues raised on your analyzed code

Is this standard markdown or something specific to the Tridion system?

 
Thx,
Ann

Hi Ann!

They are issues raised on the analyzed code and the markdown attributes are from ngx-markdown.

Hi,

Thanks for that.

Could I get the rule ID (it will look like S:1111) and a reproducer? Or is this the reproducer:

?

 
Thx,
Ann

The rule is S4670. If by reproducer you mean what keeps reproducing the issue, it is the markdown keyword in our scss files. Below is an example:

:host ::ng-deep .scl-flexible-images-with-column--group-headline h3 markdown p sup{
font-size: 50%;
top: -.75rem;
}
1 Like

Hi,

Thanks. I’ve flagged this for the language experts.

 
Ann

Thanks Ann!

Hi Ann. Should I expect the language experts to comment on this post or reach out individually?

Thanks,
Wyatt

Hi Wyatt,

Hopefully they’ll be along soon here in this thread.

 
Ann

Hello Wyatt,

Thank you for raising this issue.

The rule S4670 is customizable you can use the ignore parameter to add markdown there.

Would this fix your issue?

Hi Ilia,

Just to clarify, this would be customizable by creating a new or editing an existing quality profile correct?

Just want to make sure before I ask our internal sonar team.

Thanks,
Wyatt

1 Like

Hello Wyatt,

You are correct. To customize a rule behaviour, you must create or edit an existing quality profile.

Best,
Ilia

Great! Thank you for the information Ilia!