Regular Expression for End of Line

Hello Team,

I want to exclude block of code which starts with # MAGIC and ends with next line. I am using below property and mentioned regular expression. Could you please tell if it is correct or is there any other way to do this?

Hi,

Is what you’re trying to accomplish the ability to ignore the single line after your # MAGIC comment?

I haven’t tested this, but I suppose this would work. However, it is a bit cumbersome. Does the //NOSONAR comment not exist for the language you’re working in?

 
Ann

P.S. Props for this innovative solution that never would have occurred tome.

In this way, it is working. I am using databricks notebooks and code base is very huge so it will hectic task to add No SONAR in every notebook

One more thing, i was trying to add hard coded token in order to install package but sonarqube didn’t picket hardcoded token as security hotspot. Below is code
index_string = f’–extra-index-url https://{token}@daimler.pkgs.visualstudio.com/_packaging/DataQualityFramework%40Local/pypi/simple/ {package}’
Below are rules set on quality gate

token is hardcoded in python file. COuld you please suggest how to do it?

Hi,

We try to keep it to one topic per thread, otherwise it can get messy, fast. Could you create a new thread for this please?

 
Thx,
Ann

I have created new thread for it