Skip to content

Added StyleCop.Analyzers#143

Merged
milkshakeuk merged 37 commits intonHapiNET:masterfrom
AMCN41R:StyleCop
Feb 17, 2021
Merged

Added StyleCop.Analyzers#143
milkshakeuk merged 37 commits intonHapiNET:masterfrom
AMCN41R:StyleCop

Conversation

@AMCN41R
Copy link
Copy Markdown
Collaborator

@AMCN41R AMCN41R commented Feb 9, 2021

Addresses issue #138

The main goal of this PR is to add code styling rules and fix any violations.

Added the latest version of StyleCop.Analyzers to each main project, including a stylecop.json file and a default .editorconfig ruleset.

Have kept the default set of SA rules with the exception of the following:

# SA1633: File should have header
## Justification: not required in each indiviaul file as a top level license file exists
dotnet_diagnostic.SA1633.severity = none

# SA1101: Prefix local calls with this
## Justification: this conflicts with the default .editorconfig ruleset
dotnet_diagnostic.SA1101.severity = none

I have also temporarily disabled documentation rules (these will be tackeled under a separate issue) and obsolete code warnings (until the model code can be regenerated to use the case-corrected methods.

Fixed nearly all rule violations accross:

  • ModelGenerator
  • NHapi.Base
  • NHapi.SourceGeneration
  • NHapi.NUnit
  • NHapi.Base.NUnit
  • NHapi.NUnit.SourceGeneration

I have done limited refactoring and spelling correction, but I think that this should be addressed more thoroughly under a separate issue.

Comment thread src/NHapi.Base/Hl7Package.cs
Comment thread src/NHapi.Base/EventMapper.cs Outdated
Comment thread src/NHapi.Base/EventMapper.cs Outdated
Comment thread src/NHapi.Base/Log/HapiLogFactory.cs
Comment thread src/NHapi.Base/Log/HapiLogImpl.cs
Comment thread src/NHapi.Base/Log/IHapiLog.cs
Comment thread src/NHapi.Base/Log/ILog.cs Outdated
Comment thread src/NHapi.Base/Model/AbstractGroup.cs Outdated
Comment thread src/NHapi.Base/Model/AbstractGroupItem.cs Outdated
Comment thread src/NHapi.Base/Model/AbstractSegment.cs Outdated
Comment thread src/NHapi.Base/Model/AbstractSegmentItem.cs Outdated
Comment thread src/NHapi.Base/Model/AbstractSegmentItem.cs Outdated
Comment thread src/NHapi.Base/Model/AbstractType.cs Outdated
Comment thread src/NHapi.Base/Model/AbstractType.cs Outdated
Comment thread src/NHapi.Base/Model/AbstractType.cs Outdated
Comment thread src/NHapi.Base/Model/Configuration/HL7PackageCollection.cs
Comment thread src/NHapi.Base/Model/Configuration/HL7PackageConfigurationSection.cs Outdated
Comment thread src/NHapi.Base/Model/DataTypeUtil.cs Outdated
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Comment thread src/NHapi.Base/HL7Exception.cs Outdated
@milkshakeuk milkshakeuk force-pushed the master branch 4 times, most recently from 7b857b9 to 329df8e Compare February 15, 2021 08:51
Comment thread src/NHapi.SourceGeneration/Generators/SegmentGenerator.cs Outdated
Comment thread src/NHapi.SourceGeneration/Generators/SegmentGenerator.cs Outdated
Comment thread src/NHapi.SourceGeneration/Generators/SourceGenerator.cs Outdated
Comment thread src/NHapi.SourceGeneration/Generators/SourceGenerator.cs
Comment thread src/NHapi.SourceGeneration/Generators/SourceGenerator.cs Outdated
Comment thread src/NHapi.SourceGeneration/NormativeDatabase.cs
Comment thread src/NHapi.SourceGeneration/NormativeDatabase.cs
Comment thread src/NHapi.SourceGeneration/NormativeDatabase.cs
Comment thread src/NHapi.SourceGeneration/TableRepository.cs Outdated
Comment thread tests/NHapi.NUnit/PipeParsingFixture271.cs Outdated
Comment thread tests/NHapi.NUnit/PipeParsingFixture28.cs Outdated
Comment thread src/NHapi.Base/Parser/XMLParser.cs Outdated
Comment thread tests/NHapi.NUnit/PipeParsingFixture281.cs Outdated
Comment thread tests/NHapi.NUnit/PipeParsingFixture281.cs Outdated
@github-actions

This comment has been minimized.

Comment thread src/NHapi.Base/Parser/PipeParser.cs Outdated
Comment thread src/NHapi.Base/Parser/PipeParser.cs Outdated
Comment thread src/NHapi.Base/Parser/PipeParser.cs Outdated
Comment thread src/NHapi.Base/Parser/PipeParser.cs Outdated
Comment thread src/NHapi.Base/Parser/PipeParser.cs Outdated
Comment thread src/NHapi.Base/Parser/XMLParser.cs Outdated
Comment thread src/NHapi.Base/Parser/XMLParser.cs Outdated
Comment thread src/NHapi.SourceGeneration/TableRepository.cs
…api.sln

Updates to resolve comments from PR
@github-actions
Copy link
Copy Markdown

Unit Test Results

    5 files    48 suites   8s ⏱️
378 tests 376 ✔️ 2 💤 0 ❌
754 runs  751 ✔️ 3 💤 0 ❌

Results for commit 30658d2.

@milkshakeuk milkshakeuk merged commit ebeec1d into nHapiNET:master Feb 17, 2021
@AMCN41R AMCN41R deleted the StyleCop branch February 17, 2021 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants