Skip to content

Commit

Permalink
Add minimal coverage for TM-related license rules
Browse files Browse the repository at this point in the history
 * this is a fix for aboutcode-org#734 to ensure that bare trademark
   mentions are not picked up alone as approximate matches

Signed-off-by: Philippe Ombredanne <[email protected]>
  • Loading branch information
pombredanne authored and Sushant Gupta committed Jan 20, 2018
1 parent 214194e commit 9fb6040
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/licensedcode/data/rules/adobe-eula_and_gpl.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
licenses:
- adobe-eula
- gpl-1.0-plus
notes: only the packaging is under the GPL
notes: only the packaging is under the GPL
minimum_coverage: 30
1 change: 1 addition & 0 deletions src/licensedcode/data/rules/scansoft-1.2_4.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
licenses:
- scansoft-1.2
notes: Notice with trademarks
minimum_coverage: 30
87 changes: 87 additions & 0 deletions tests/licensedcode/data/licenses/AssemblyInfoCommon.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
//---------------------------------------------------------------------
// <copyright file="AssemblyInfoCommon.cs" company="Microsoft">
// Copyright (C) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
// </copyright>
//---------------------------------------------------------------------

using System;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;

#if !SUPPRESS_PORTABLELIB_TARGETFRAMEWORK_ATTRIBUTE
#if PORTABLELIB
#if ODATA_CLIENT
[assembly: TargetFramework(".NETPortable,Version=v4.5,Profile=Profile259", FrameworkDisplayName = ".NET Portable Subset")]
#else
[assembly: TargetFramework(".NETPortable,Version=v4.0,Profile=Profile328", FrameworkDisplayName = ".NET Portable Subset")]
#endif
#endif
#endif

[assembly: AssemblyCompany("Microsoft Corporation")]
// If you want to control this metadata globally but not with the VersionProductName property, hard-code the value below.
// If you want to control this metadata at the individual project level with AssemblyInfo.cs, comment-out the line below.
// If you leave the line below unchanged, make sure to set the property in the root build.props, e.g.: <VersionProductName Condition="'$(VersionProductName)'==''">Your Product Name</VersionProductName>
// [assembly: AssemblyProduct("%VersionProductName%")]
[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyTrademark("Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the U.S. and/or other countries.")]
[assembly: AssemblyCulture("")]
#if (DEBUG || _DEBUG)
[assembly: AssemblyConfiguration("Debug")]
#endif

#if ASSEMBLY_ATTRIBUTE_PRODUCT_VS
[assembly: AssemblyProduct("Microsoft (R) Visual Studio (R) 2010")]
#else
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
#endif

#if ASSEMBLY_ATTRIBUTE_CLS_COMPLIANT
[assembly: CLSCompliant(true)]
#else
[assembly: CLSCompliant(false)]
#endif

#if ASSEMBLY_ATTRIBUTE_COM_VISIBLE
[assembly: ComVisible(true)]
#else
[assembly: ComVisible(false)]
#endif

#if ASSEMBLY_ATTRIBUTE_COM_COMPATIBLE_SIDEBYSIDE
[assembly:ComCompatibleVersion(1,0,3300,0)]
#endif

#if ASSEMBLY_ATTRIBUTE_ALLOW_PARTIALLY_TRUSTED_CALLERS
[assembly: AllowPartiallyTrustedCallers]
#else
#if ASSEMBLY_ATTRIBUTE_CONDITIONAL_APTCA_L2
[assembly:AllowPartiallyTrustedCallers(PartialTrustVisibilityLevel=PartialTrustVisibilityLevel.NotVisibleByDefault)]
#endif
#endif

#if ASSEMBLY_ATTRIBUTE_TRANSPARENT_ASSEMBLY
[assembly: SecurityTransparent]
#endif

#if !SUPPRESS_SECURITY_RULES
#if SECURITY_MIGRATION && !ASSEMBLY_ATTRIBUTE_CONDITIONAL_APTCA_L2
#if ASSEMBLY_ATTRIBUTE_SKIP_VERIFICATION_IN_FULLTRUST
[assembly: SecurityRules(SecurityRuleSet.Level1, SkipVerificationInFullTrust = true)]
#else
[assembly: SecurityRules(SecurityRuleSet.Level1)]
#endif
#else
#if ASSEMBLY_ATTRIBUTE_SKIP_VERIFICATION_IN_FULLTRUST
[assembly: SecurityRules(SecurityRuleSet.Level2, SkipVerificationInFullTrust = true)]
#else
[assembly: SecurityRules(SecurityRuleSet.Level2)]
#endif
#endif
#endif

[assembly:NeutralResourcesLanguageAttribute("en-US")]
2 changes: 2 additions & 0 deletions tests/licensedcode/data/licenses/AssemblyInfoCommon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
notes: nothing should be detected here

0 comments on commit 9fb6040

Please sign in to comment.