Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use empty line as header decoration without triggering SA1028, SA1120 #2657

Closed
lennylxx opened this issue Apr 19, 2018 · 2 comments
Closed
Assignees
Milestone

Comments

@lennylxx
Copy link

lennylxx commented Apr 19, 2018

I'm using version 1.1.0-beta006, and I have below settings:

  "settings": {
    "documentationRules": {
      "companyName": "Foo",
      "copyrightText": "\r\nCopyright (c) {companyName} Corporation. All rights reserved.\r\n",
      "xmlHeader": false
    }

What I want to achieve is that:

//<- no spaces here
// Copyright (c) Foo Corporation. All rights reserved.
//<- no spaces here

But the generated header contains an extra space in the 1st and 3rd line, like this:

// <- 1 space here
// Copyright (c) Foo Corporation. All rights reserved.
// <- 1 space here

And it's violating SA1028, if I removed the extra space manually, it's violating SA1120.
How can I achieve the result I expected, without turning off SA1028 and SA1120?

@sharwell
Copy link
Member

It's not currently possible, but it's fixable so I'm marking this as a bug. 😄

@sharwell sharwell added this to the 1.1.0 milestone Apr 19, 2018
@sharwell sharwell self-assigned this May 2, 2018
sharwell added a commit to sharwell/StyleCopAnalyzers that referenced this issue May 2, 2018
@sharwell sharwell modified the milestones: 1.1.0, 1.1.0 Beta 7 May 2, 2018
sharwell added a commit to sharwell/StyleCopAnalyzers that referenced this issue May 2, 2018
@lennylxx
Copy link
Author

lennylxx commented May 3, 2018

Nice to see this fixed, thank you for your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants