GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Disable IDE0073: FileHeaderMismatch by xtqqczze · Pull Request #13935 · PowerShell/PowerShell

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Oct 29, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Various files do not match the file_header_template in root EditorConfig:
Copyright (c) Microsoft Corporation.\nLicensed under the MIT License.

For example, src\System.Management.Automation\engine\interpreter\InstructionList.cs uses Apache License.

This PR sets the rule severity to suggestion.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@xtqqczze
Silence IDE0073: FileHeaderMismatch
2150df4
@ghost ghost assigned Ilya (iSazonov) Oct 29, 2020
@xtqqczze

xtqqczze commented Oct 29, 2020

Copy link
Copy Markdown
Contributor Author

Ilya (@iSazonov) Can you merge?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov

Ilya (iSazonov) commented Oct 30, 2020

Copy link
Copy Markdown
Collaborator

No, we should inform users to use right header. We need to set "suggestion". Or we could suppress the rule for some files/folders.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xtqqczze

xtqqczze commented Oct 30, 2020

Copy link
Copy Markdown
Contributor Author

Ilya (@iSazonov) We cannot use directory based suppression, at least for src\System.Management.Automation\engine\interpreter\ as there are files with different licenses present in the same directory.

For suggestion severity, I worry that it would be too easy for a contributor to accidentally accept a light bulb recommendation in an existing file, resulting in a change in the license header! If we were to set suggestion, I would want maintainer review of this change.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov

Ilya (iSazonov) commented Oct 30, 2020

Copy link
Copy Markdown
Collaborator

For suggestion severity, I worry that it would be too easy for a contributor to accidentally accept a light bulb recommendation in an existing file, resulting in a change in the license header!

It is not problem. We have some files from other repositories with different licenses and the files are frozen. We know about this. So "suggestion" is good compromise.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xtqqczze
Use suggestion severity
2790bb4
@xtqqczze xtqqczze changed the title Silence IDE0073: FileHeaderMismatch Disable IDE0073: FileHeaderMismatch Oct 30, 2020
@xtqqczze

xtqqczze commented Oct 30, 2020

Copy link
Copy Markdown
Contributor Author

For suggestion severity, I worry that it would be too easy for a contributor to accidentally accept a light bulb recommendation in an existing file, resulting in a change in the license header!

It is not problem. We have some files from other repositories with different licenses and the files are frozen. We know about this. So "suggestion" is good compromise.

OK

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xtqqczze

xtqqczze commented Oct 30, 2020

Copy link
Copy Markdown
Contributor Author

Ilya (@iSazonov) Are there any options for suppression on a per file basis, other than the following?

#pragma warning disable IDE0073 // The file header does not match the required text
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#pragma warning restore IDE0073 // The file header does not match the required text

The example above is for the file: src\System.Management.Automation\engine\ComInterop\ArgBuilder.cs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov

Ilya (iSazonov) commented Oct 30, 2020

Copy link
Copy Markdown
Collaborator

xtqqczze The case is so rare and not critical so we can use "suggestion" without any concerns - maintainer will review and ensure.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov Ilya (iSazonov) closed this Oct 30, 2020
@iSazonov

Ilya (iSazonov) commented Oct 30, 2020

Copy link
Copy Markdown
Collaborator

Reopen the PR to restart all CIs.

xtqqczze reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov Ilya (iSazonov) reopened this Oct 30, 2020
@xtqqczze

xtqqczze commented Oct 30, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Build failures are due to PowerShell Gallery unavailability, see #13946.

iSazonov reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xtqqczze

xtqqczze commented Oct 31, 2020

Copy link
Copy Markdown
Contributor Author

closing and reopening to restart tests

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xtqqczze xtqqczze closed this Oct 31, 2020
@xtqqczze xtqqczze reopened this Oct 31, 2020
@iSazonov

Ilya (iSazonov) commented Oct 31, 2020

Copy link
Copy Markdown
Collaborator

I wonder before the change we have "warning" but build does not fail.

xtqqczze reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xtqqczze

xtqqczze commented Oct 31, 2020

Copy link
Copy Markdown
Contributor Author

It appears that IDE0073 is only triggering in live analysis, not in build. We need to set MSBuild property EnforceCodeStyleInBuild.

iSazonov reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xtqqczze xtqqczze mentioned this pull request Oct 31, 2020
Enforce code style in build #13957
Merged
@xtqqczze

xtqqczze commented Nov 1, 2020

Copy link
Copy Markdown
Contributor Author

Change was merged in #13957.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xtqqczze xtqqczze closed this Nov 1, 2020
@xtqqczze
xtqqczze deleted the disable-IDE0073 branch November 1, 2020 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@iSazonov Ilya (iSazonov)

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@xtqqczze @iSazonov
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.