BartPermentier / al-toolbox

Adds Features to the AL Language Extension
MIT License
13 stars 9 forks source link

Surround AL0432 with Pragma --> Add option (Review Later) #46

Closed fvet closed 3 years ago

fvet commented 3 years ago

Following https://github.com/HodorNV/ALOps/issues/381, I'm still looking for a decent solution to show / treat / delay AL0432 warnings as part of our pipelines.

Conclusion: we currently have the AL0432 rule set with action Warning and thus these warnings require attention (1/2).

Next, we've obsoleted some of our own ISV tables (obsoletestate = Pending). For some features, we do not support current / new behavior side-by-side and thus also obsoleted some procedures / publishers, (in fact, 'obsoleted' means 'removed / no longer supported' in these scenarios) resulting in AL0432 warnings too.

(1) These warnings can be ignored (forever - untill we can actually delete the procedures / publishers) using the 'Surround AL0432 with Pragma', which adds the pragma directive

#pragma warning disable AL0432

(2) However, we'd like to treat the other BC AL0432 warnings that require future attention by setting a temporary pragma, to be removed / treated in a later release. Current idea is to mark them with a // TODO tag.

#pragma warning disable AL0432 // TODO - Review in next release

image

Not sure if this make sense, but we couldn't find a better way.

Long story short: Would it be possible for AL Toolbox to add a 'Surround AL0432 with Pragma (// TODO)' or 'Surround AL0432 with Pragma (Review Later)' option? It at least points the developer to make a choice on how to set the pragma.

BartPermentier commented 3 years ago

Hello Frédéric,

Seems like a usefull addition, I've added it to the queue. But mind that it can take a few weeks / months as we only develop for this project if we got time to spare. You can speed up the process if you have your own JScript Developer that can do the requested change then I'll merge it :)

fvet commented 3 years ago

There's a good developer coming your way ;)

BartPermentier commented 3 years ago

Well i'll assign this as his first task then, so the sooner you let him go... ;)

dsaveyn commented 3 years ago

Hi Frédéric,

We solved this one for you. A new quick action was introduced which allows you to add a pragma with a TODO tag and an optional comment. This will be made available in the next release.

Here's a sneak preview:

Pragma With Comment

@BartPermentier FYI