Skip to content

Commit

Permalink
Files in linker repository now have the same license header at the be…
Browse files Browse the repository at this point in the history
…ginning of the file (#2469)

Some of the files that hold a license from a third party now have the two licenses as header files
Linker now uses the sdk format of license header instead of the runtime one
Added having the license header as warning in the editor config
Added THIRD-PARTY-NOTICES.TXT file to the repo root
  • Loading branch information
tlakollo committed Mar 31, 2022
1 parent cb11422 commit 4f0d349
Show file tree
Hide file tree
Showing 588 changed files with 1,685 additions and 959 deletions.
11 changes: 8 additions & 3 deletions .editorconfig
Expand Up @@ -101,8 +101,8 @@ dotnet_diagnostic.IDE0060.severity = warning
dotnet_diagnostic.IDE0065.severity = warning

# IDE0073: File header
dotnet_diagnostic.IDE0073.severity = suggestion
file_header_template = Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MIT license.
dotnet_diagnostic.IDE0073.severity = warning
file_header_template = Copyright (c) .NET Foundation and contributors. All rights reserved.\nLicensed under the MIT license. See LICENSE file in the project root for full license information.

# IDE0074: Use compound assignment
dotnet_diagnostic.IDE0074.severity = warning
Expand Down Expand Up @@ -147,9 +147,14 @@ dotnet_diagnostic.CA1822.severity = none
dotnet_diagnostic.IDE0060.severity = none

[test/**/*.cs]

dotnet_diagnostic.IDE0060.severity = none

[test/Mono.Linker.Tests/TestCases/Dependencies/WarningSuppressionExpectations*.cs]
dotnet_diagnostic.IDE0073.severity = none

[external**]
dotnet_diagnostic.IDE0073.severity = none

[external**]
dotnet_analyzer_diagnostic.severity = none
generated_code = true
75 changes: 75 additions & 0 deletions THIRD-PARTY-NOTICES.TXT
@@ -0,0 +1,75 @@
.NET Linker uses third-party libraries or other resources that may be
distributed under licenses different than the .NET Linker software.

In the event that we accidentally failed to list a required notice, please
bring it to our attention. Post an issue or email us:

dotnet@microsoft.com

The attached notices are provided for information only.

License notice for Xamarin and Novell
-------------------------------------

Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Copyright (c) 2011 Novell, Inc (http://www.novell.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

License for Jb Evain
---------------------

Copyright (c) 2006 Jb Evain (jbevain@gmail.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
6 changes: 3 additions & 3 deletions src/ILLink.CodeFix/BaseAttributeCodeFixProvider.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Linq;
Expand Down Expand Up @@ -122,4 +122,4 @@ protected static bool HasPublicAccessibility (ISymbol? m)
return true;
}
}
}
}
4 changes: 2 additions & 2 deletions src/ILLink.CodeFix/RequiresAssemblyFilesCodeFixProvider.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Immutable;
Expand Down
4 changes: 2 additions & 2 deletions src/ILLink.CodeFix/RequiresDynamicCodeCodeFixProvider.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Immutable;
Expand Down
4 changes: 2 additions & 2 deletions src/ILLink.CodeFix/RequiresUnreferencedCodeCodeFixProvider.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Immutable;
Expand Down
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Collections.Immutable;
using System.Composition;
Expand Down
4 changes: 2 additions & 2 deletions src/ILLink.RoslynAnalyzer/AnalyzerOptionsExtensions.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Linq;
using Microsoft.CodeAnalysis;
Expand Down
5 changes: 2 additions & 3 deletions src/ILLink.RoslynAnalyzer/COMAnalyzer.cs
@@ -1,6 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Immutable;
Expand Down
3 changes: 3 additions & 0 deletions src/ILLink.RoslynAnalyzer/DataFlow/ControlFlowGraphProxy.cs
@@ -1,3 +1,6 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
Expand Down
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
Expand Down
6 changes: 3 additions & 3 deletions src/ILLink.RoslynAnalyzer/DataFlow/LocalDataFlowState.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using ILLink.Shared.DataFlow;
Expand Down Expand Up @@ -31,4 +31,4 @@ public void Set (LocalKey key, TValue value)

public TValue Get (LocalKey key) => current.Get (key);
}
}
}
6 changes: 3 additions & 3 deletions src/ILLink.RoslynAnalyzer/DataFlow/LocalDataFlowVisitor.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Immutable;
Expand Down Expand Up @@ -268,4 +268,4 @@ public override TValue VisitObjectCreation (IObjectCreationOperation operation,
operation);
}
}
}
}
6 changes: 3 additions & 3 deletions src/ILLink.RoslynAnalyzer/DataFlow/LocalStateLattice.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using ILLink.Shared.DataFlow;
Expand Down Expand Up @@ -63,4 +63,4 @@ public LocalStateLattice (TValueLattice valueLattice)

public LocalState<TValue> Meet (LocalState<TValue> left, LocalState<TValue> right) => new (Lattice.Meet (left.Dictionary, right.Dictionary));
}
}
}
6 changes: 3 additions & 3 deletions src/ILLink.RoslynAnalyzer/DataFlow/OperationWalker.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Operations;
Expand Down Expand Up @@ -38,4 +38,4 @@ private void VisitChildOperations (IOperation operation, TArgument argument)
return default;
}
}
}
}
6 changes: 3 additions & 3 deletions src/ILLink.RoslynAnalyzer/DataFlow/StackGuard.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Diagnostics;
Expand Down Expand Up @@ -29,4 +29,4 @@ public static void EnsureSufficientExecutionStack (int recursionDepth)
}
}
}
}
}
4 changes: 2 additions & 2 deletions src/ILLink.RoslynAnalyzer/DiagnosticDescriptors.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using ILLink.Shared;
Expand Down
6 changes: 3 additions & 3 deletions src/ILLink.RoslynAnalyzer/DynamicallyAccessedMemberTypes.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace System.Diagnostics.CodeAnalysis
{
Expand Down Expand Up @@ -92,4 +92,4 @@ public enum DynamicallyAccessedMemberTypes
/// </summary>
All = ~None
}
}
}
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
Expand Down
4 changes: 2 additions & 2 deletions src/ILLink.RoslynAnalyzer/INamedTypeSymbolExtensions.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
Expand Down
4 changes: 2 additions & 2 deletions src/ILLink.RoslynAnalyzer/IOperationExtensions.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Diagnostics;
using Microsoft.CodeAnalysis;
Expand Down
4 changes: 2 additions & 2 deletions src/ILLink.RoslynAnalyzer/ISymbolExtensions.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Diagnostics.CodeAnalysis;
using System.Text;
Expand Down
4 changes: 2 additions & 2 deletions src/ILLink.RoslynAnalyzer/ITypeSymbolExtensions.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Diagnostics;
Expand Down
4 changes: 2 additions & 2 deletions src/ILLink.RoslynAnalyzer/ImmutableArrayOperations.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Collections.Generic;
using System.Collections.Immutable;
Expand Down
4 changes: 2 additions & 2 deletions src/ILLink.RoslynAnalyzer/MSBuildPropertyOptionNames.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace ILLink.RoslynAnalyzer
{
Expand Down
6 changes: 3 additions & 3 deletions src/ILLink.RoslynAnalyzer/NullableAttributes.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

// This was copied from https://github.com/dotnet/runtime/blob/39b9607807f29e48cae4652cd74735182b31182e/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/NullableAttributes.cs
// and updated to have the scope of the attributes be internal.
Expand Down Expand Up @@ -146,4 +146,4 @@ public MemberNotNullWhenAttribute (bool returnValue, params string[] members)
}

#endif
}
}
4 changes: 2 additions & 2 deletions src/ILLink.RoslynAnalyzer/RequiresAnalyzerBase.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Immutable;
Expand Down
4 changes: 2 additions & 2 deletions src/ILLink.RoslynAnalyzer/RequiresAssemblyFilesAnalyzer.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Immutable;
Expand Down
4 changes: 2 additions & 2 deletions src/ILLink.RoslynAnalyzer/RequiresDynamicCodeAnalyzer.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Collections.Immutable;
using ILLink.Shared;
Expand Down
4 changes: 2 additions & 2 deletions src/ILLink.RoslynAnalyzer/RequiresISymbolExtensions.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Diagnostics.CodeAnalysis;
using Microsoft.CodeAnalysis;
Expand Down
4 changes: 2 additions & 2 deletions src/ILLink.RoslynAnalyzer/RequiresUnreferencedCodeAnalyzer.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Immutable;
Expand Down
4 changes: 2 additions & 2 deletions src/ILLink.RoslynAnalyzer/RequiresUnreferencedCodeUtils.cs
@@ -1,5 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Diagnostics.CodeAnalysis;
using ILLink.Shared;
Expand Down

0 comments on commit 4f0d349

Please sign in to comment.