Skip to content

Commit a39fbba

Browse files
authored
Check copyright header during the build (dotnet#1829)
1 parent cf3887b commit a39fbba

File tree

83 files changed

+116
-87
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+116
-87
lines changed

eng/StyleCop.Analyzers.ruleset

+5-5
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,10 @@
164164
<Rule Id="SA1626" Action="None" /> <!-- Single-line comments should not use documentation style slashes -->
165165
<Rule Id="SA1627" Action="None" /> <!-- The documentation text within the \'exception\' tag should not be empty -->
166166
<Rule Id="SA1629" Action="None" /> <!-- Documentation text should end with a period -->
167-
<Rule Id="SA1633" Action="None" /> <!-- File should have header -->
168-
<Rule Id="SA1634" Action="None" /> <!-- File Header must show copyright. Our header does not use the expected syntax -->
169-
<Rule Id="SA1635" Action="None" /> <!-- Same as SA1634? -->
170-
<Rule Id="SA1636" Action="None" /> <!-- File Header copyright tag must match -->
167+
<Rule Id="SA1633" Action="Error" /> <!-- File should have header -->
168+
<Rule Id="SA1634" Action="None" /> <!-- File Header must show copyright. -->
169+
<Rule Id="SA1635" Action="Error" /> <!-- Same as SA1634? -->
170+
<Rule Id="SA1636" Action="Error" /> <!-- File Header copyright tag must match -->
171171
<Rule Id="SA1637" Action="None" /> <!-- File Header must contain file name -->
172172
<Rule Id="SA1638" Action="Error" />
173173
<Rule Id="SA1640" Action="None" /> <!-- File header must have valid company text -->
@@ -179,6 +179,6 @@
179179
<Rule Id="SA1651" Action="Error" />
180180
<Rule Id="SA1652" Action="Error" />
181181
<Rule Id="SX1101" Action="Error" /> <!-- Do not prefix local members with this -->
182-
<Rule Id="SX1309" Action="Error" /> <!-- Members should be prefixed with _ -->
182+
<Rule Id="SX1309" Action="Error" /> <!-- Members should be prefixed with _ -->
183183
</Rules>
184184
</RuleSet>

eng/stylecop.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
},
1313
"documentationRules": {
1414
"documentInterfaces": true,
15-
"documentInternalElements": false
15+
"documentInternalElements": false,
16+
"copyrightText": "Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MIT license.",
17+
"xmlHeader": false
1618
}
1719
}
1820
}

src/System.Device.Gpio.Tests/RetryHelper.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information
43

54
using System.Collections.Generic;
65
using System.Threading;

src/System.Device.Gpio.Tests/TimeoutHelper.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information
43

54
using System.Threading.Tasks;
65

src/System.Device.Gpio/Interop/Unix/libbcm_host/Interop.libbcmhost.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information
43

54
// Disable these StyleCop rules for this file, as we are using native names here.
65
#pragma warning disable SA1300 // Element should begin with upper-case letter

src/System.Device.Gpio/Interop/Unix/libgpiod/Interop.libgpiod.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information
43

54
// Disable these StyleCop rules for this file, as we are using native names here.
65
#pragma warning disable SA1300 // Element should begin with upper-case letter

src/System.Device.Gpio/System/Device/Gpio/Drivers/LibGpiodDriver.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information
43

54
using System.Collections.Generic;
65
using System.Threading;

src/System.Device.Gpio/System/Device/Gpio/LibgpiodDriverEventHandler.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information
43

54
using System.Diagnostics;
65
using System.Runtime.InteropServices;

src/System.Device.Gpio/System/Device/Gpio/WaitEventResult.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information
43

54
namespace System.Device.Gpio
65
{

src/devices/Arduino/ArduinoI2cBus.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Collections.Generic;
36
using System.Device.I2c;
47
using System.Linq;

src/devices/Arduino/CommandError.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
namespace Iot.Device.Arduino
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace Iot.Device.Arduino
25
{
36
/// <summary>
47
/// Possible results of sending a Firmata command

src/devices/Board/CustomBoard.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Collections.Generic;
36
using System.Device.Gpio;
47
using System.Device.I2c;

src/devices/Board/I2cBusExtensions.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Collections.Generic;
36
using System.Device.I2c;
47
using System.IO;

src/devices/Board/samples/Program.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
using System;
65
using System.Device.Gpio;

src/devices/Board/tests/I2cBusManagerTest.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Collections.Generic;
36
using System.Device.I2c;
47
using System.Text;

src/devices/Board/tests/I2cDummyBus.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Collections.Generic;
36
using System.Device.I2c;
47
using System.Text;

src/devices/Card/CardTransceiver.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Collections.Generic;
36
using System.Text;
47

src/devices/CharacterLcd/CharacterLcdExtensions.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Collections.Generic;
36
using System.Text;
47

src/devices/CharacterLcd/LcdValueUnitDisplay.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
using System;
65
using System.Collections.Generic;

src/devices/CharacterLcd/samples/LargeValueSample.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Collections.Generic;
36
using System.Globalization;
47
using System.Linq;

src/devices/CharacterLcd/tests/LcdConsoleTests.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Collections.Generic;
36
using System.Globalization;
47
using System.Text;

src/devices/CharacterLcd/tests/LcdValueUnitDisplayTests.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Collections.Generic;
36
using System.Globalization;
47
using System.Text;

src/devices/Charlieplex/CharlieplexSegment.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Device.Gpio;
36
using System.Diagnostics;
47
using System.Threading;

src/devices/Charlieplex/CharlieplexSegmentNode.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Device.Gpio;
36
using System.Diagnostics;
47
using System.Threading;

src/devices/Charlieplex/samples/Program.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Linq;
36
using System.Threading;
47
using Iot.Device.Multiplexing;

src/devices/Charlieplex/tests/CharlieplexLayout.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using Iot.Device.Multiplexing;
36
using Xunit;
47

src/devices/Common/Iot/Device/Common/ValueArray.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Collections;
36
using System.Collections.Generic;
47
using System.Linq;

src/devices/Common/Iot/Device/Multiplexing/GpioOutputSegment.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
using System;
65
using System.Device.Gpio;

src/devices/Common/Iot/Device/Multiplexing/tests/OutputSegmentTests.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Threading;
36
using System.Device.Gpio;
47
using Iot.Device.Multiplexing.Utility;

src/devices/Common/samples/MyTestComponent.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Collections.Generic;
36
using System.Linq;
47
using System.Text;

src/devices/GoPiGo3/Models/GrovePort.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Collections.Generic;
36
using System.Text;
47

src/devices/KeyMatrix/KeyMatrix.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
using System;
65
using System.Collections.Generic;

src/devices/KeyMatrix/KeyMatrixEvent.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
using System.Device.Gpio;
65

src/devices/KeyMatrix/samples/Program.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
using System;
65
using System.Collections.Generic;

src/devices/Mcp25xxx/tests/Register/AcceptanceFilter/RxFxSidhTests.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// The .NET Foundation licenses this file to you under the MIT license.
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
23

34
using Iot.Device.Mcp25xxx.Register;
45
using Iot.Device.Mcp25xxx.Register.AcceptanceFilter;

src/devices/Media/VideoDevice/samples/MjpegStream/Camera.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
using System;
65
using System.Drawing;

src/devices/Media/VideoDevice/samples/MjpegStream/Controllers/Image.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
using System;
65
using System.Buffers;

src/devices/Media/VideoDevice/samples/MjpegStream/Program.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
using System;
65
using System.IO;

src/devices/Media/VideoDevice/samples/MjpegStream/Startup.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
using Microsoft.AspNetCore.Builder;
65
using Microsoft.AspNetCore.Hosting;

src/devices/Nmea0183/Identification.Extra.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25

36
namespace Iot.Device.Nmea0183
47
{

src/devices/Nmea0183/Sentences/NavigationStatus.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Collections.Generic;
36
using System.Linq;
47
using System.Text;

src/devices/Nmea0183/Sentences/RotationSource.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
namespace Iot.Device.Nmea0183.Sentences
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace Iot.Device.Nmea0183.Sentences
25
{
36
/// <summary>
47
/// Source for the engine revolution data

src/devices/Nmea0183/samples/SimpleParser/SimpleParser.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
using System;
65
using System.IO.Ports;

src/devices/PiJuice/Models/BatteryChargingTemperatureFault.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
namespace Iot.Device.PiJuiceDevice.Models
65
{

src/devices/PiJuice/Models/BatteryChemistry.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
namespace Iot.Device.PiJuiceDevice.Models
65
{

src/devices/PiJuice/Models/BatteryExtendedProfile.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
using UnitsNet;
65

src/devices/PiJuice/Models/BatteryOrigin.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
namespace Iot.Device.PiJuiceDevice.Models
65
{

src/devices/PiJuice/Models/BatteryProfile.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3-
// See the LICENSE file in the project root for more information.
43

54
using UnitsNet;
65

0 commit comments

Comments
 (0)