-
Notifications
You must be signed in to change notification settings - Fork 833
Closed
Labels
Description
Please provide a succinct description of the issue.
Given the following F# code:
[<assembly: SuppressMessage("Gendarme.Rules.Performance",
"AvoidRepetitiveCallsToPropertiesRule",
Scope = "member", // MethodDefinition
Target = "AltCover.Recorder.Instance/I/CallTrack::instance()",
Justification = "Bytecode delta only")>]
()
and matching AST:
...
Attributes
([{ Attributes =
[{ TypeName = SynLongIdent ([SuppressMessage], [], [None])
ArgExpr =
Paren
(Tuple
(false,
[...],
[tmp.fsx (1,56--1,57); tmp.fsx (2,66--2,67);
tmp.fsx (3,44--3,45); tmp.fsx (4,89--4,90)],
tmp.fsx (1,28--5,65)), tmp.fsx (1,27--1,28),
Some tmp.fsx (5,65--5,66), tmp.fsx (1,27--5,66))
Target = Some assembly
AppliesToGetterAndSetter = false
Range = tmp.fsx (1,12--1,27) }]
...Notice how the range of SynAttribute is 1,12--1,27, while it has children that are well beyond 1,27.
Expected behaviour
I would assume the range spans until the end of the ArgExpr node.
Actual behaviour
It only included the TypeName.
Known workarounds
A more suitable range can be composed.
Related information
Latest main branch.
auduchinok