You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* * SonarAnalyzer for .NET * Copyright (C) 2015-2024 SonarSource SA * mailto: contact AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */namespace SonarAnalyzer.Helpers;publicenumTrustedCodeSource{Roslyn,StyleCop}[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface | AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Property, AllowMultiple =true, Inherited =false)]publicsealedclassCodeCopiedFromAttribute:Attribute{publicCodeCopiedFromAttribute(TrustedCodeSourcetrustedCodeSource,stringpermanentUrl){TrustedCodeSource=trustedCodeSource;PermanentUrl=permanentUrl;}publicTrustedCodeSourceTrustedCodeSource{get;}publicstringPermanentUrl{get;}publicstringReasoning{get;set;}}
The text was updated successfully, but these errors were encountered:
As described in this working document, we want to add a CodeCopiedFromAttribute to our code base, to mark code snippets from well-known sources. https://docs.google.com/document/d/1WgxCWCFyKt2mI46U83fWkpea06NT-EmwWIa_XmvWLM0/edit
A first attempt was implemented here, but needed to be reverted/removed, because the coverage exclusion did not work.
#8947 (comment)
This issue is about re-introducing the attribute and marking all existing code that was copied from Roslyn or StyleCop with the attribute instead. The attribute API can be found here:
https://github.com/SonarSource/sonar-dotnet/blob/f42578d120d51c4648ce51c1694573e9ee2c7808/analyzers/src/SonarAnalyzer.Common/Helpers/CodeCopiedFromAttribute.cs
The text was updated successfully, but these errors were encountered: