Skip to content

Commit

Permalink
Add private package.json to EnsureFileHeaders tool (#59)
Browse files Browse the repository at this point in the history
* Add private package.json to EnsureFileHeaders tool

* Change files
  • Loading branch information
vmoroz authored Feb 11, 2022
1 parent 883f4ab commit b08fe85
Show file tree
Hide file tree
Showing 16 changed files with 175 additions and 163 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Add private package.json to EnsureFileHeaders tool",
"packageName": "@microsoft/mso",
"email": "[email protected]",
"dependentChangeType": "patch"
}
2 changes: 1 addition & 1 deletion libs/activeObject/tests/activeObjectTest.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// Licensed under the MIT license.

#include <activeObject/activeObject.h>
#include <eventWaitHandle/eventWaitHandle.h>
Expand Down
2 changes: 1 addition & 1 deletion libs/dispatchQueue/include/dispatchQueue/dispatchQueue.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// Licensed under the MIT license.

#pragma once
#ifndef MSO_DISPATCHQUEUE_DISPATCHQUEUE_H
Expand Down
2 changes: 1 addition & 1 deletion libs/errorCode/tests/errorProviderTest.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// Licensed under the MIT license.

#include "errorCode/exceptionErrorProvider.h"
#include "errorCode/hresultErrorProvider.h"
Expand Down
2 changes: 1 addition & 1 deletion libs/eventWaitHandle/tests/eventWaitHandleTest.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// Licensed under the MIT license.

#include <eventWaitHandle/eventWaitHandle.h>

Expand Down
2 changes: 1 addition & 1 deletion libs/future/tests/arrayViewTest.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// Licensed under the MIT license.

#include "future/future.h"
#include "motifCpp/libletAwareMemLeakDetection.h"
Expand Down
2 changes: 1 addition & 1 deletion libs/future/tests/cancellationTokenTest.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// Licensed under the MIT license.

#include "future/cancellationToken.h"
#include "motifCpp/libletAwareMemLeakDetection.h"
Expand Down
2 changes: 1 addition & 1 deletion libs/future/tests/executorTest.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// Licensed under the MIT license.

#include "dispatchQueue/dispatchQueue.h"
#include "future/future.h"
Expand Down
2 changes: 1 addition & 1 deletion libs/future/tests/testCheck.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// Licensed under the MIT license.

#pragma once

Expand Down
2 changes: 1 addition & 1 deletion libs/future/tests/testExecutor.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// Licensed under the MIT license.

#pragma once

Expand Down
2 changes: 1 addition & 1 deletion libs/span/include/span/span.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// Licensed under the MIT license.

#pragma once
#ifndef MSO_SPAN_SPAN_H
Expand Down
2 changes: 1 addition & 1 deletion libs/typeTraits/include/typeTraits/tags.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// Licensed under the MIT license.

#pragma once
#ifndef MSO_TYPETRAITS_TAGS_H
Expand Down
12 changes: 5 additions & 7 deletions tools/EnsureFileHeaders/ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
The EnsureFileHeaders utility updates source files to have the required copyright headers.

# Usage

## Compile

1. npm init
1. npm install -g typescript
1. npm install --save-dev @types/node
1. npm install readdirp
1. npm install yargs
1. tsc EnsureFileHeaders.ts
1. yarn
1. yarn compile

## Run

1. node EnsureFileHeaders.js -d directoryPathToScan
1. yarn ensure-headers
145 changes: 0 additions & 145 deletions tools/EnsureFileHeaders/package-lock.json

This file was deleted.

21 changes: 21 additions & 0 deletions tools/EnsureFileHeaders/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "@microsoft/ensurefileheaders",
"version": "0.0.1",
"private": true,
"description": "Ensure that all source files have the correct headers",
"scripts": {
"compile": "node_modules/.bin/tsc EnsureFileHeaders.ts",
"ensure-headers": "node EnsureFileHeaders.js -d ..\\.."
},
"repository": {
"type": "git",
"url": "[email protected]:microsoft/mso.git"
},
"license": "MIT",
"devDependencies": {
"@types/node": "^17.0.17",
"readdirp": "^3.6.0",
"typescript": "^4.5.5",
"yargs": "^17.3.1"
}
}
Loading

0 comments on commit b08fe85

Please sign in to comment.