Skip to content

Commit

Permalink
Update repo files (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-hughes authored Oct 6, 2024
1 parent 87ccac1 commit 73bb393
Show file tree
Hide file tree
Showing 14 changed files with 332 additions and 30 deletions.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/01_general.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: General question or documentation update
about: If you have a general question or documentation update suggestion around the resource module.
---
<!--
Your feedback and support is greatly appreciated, thanks for contributing!
-->
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/02_command_proposal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: New command proposal
description: If you have a proposal for a new public command that you think should be added to this module. The new command that is proposed shall be able to be used by a new or existing resource.
title: "NewCommandName: New command proposal"
labels: []
assignees: []
body:
- type: markdown
attributes:
value: |
Please replace `NewCommandName` in the issue title (above) with your proposed command name.
Thank you for contributing and making this module better!
- type: textarea
id: description
attributes:
label: Command proposal
description: Provide information how this command will/should work and how it will help users.
validations:
required: true
- type: textarea
id: proposedParameters
attributes:
label: Proposed parameters
description: |
List all the proposed parameters and any parameter sets that the command should have. For each parameter provide a detailed description, the data type, if a default value should be used, and if the property is limited to a set of values.
value: |
Parameter | Mandatory | Data type | Description | Default value | Allowed values
--- | --- | --- | --- | --- | ---
ParameterName | Yes | String | Detailed description | None | None
validations:
required: true
- type: textarea
id: considerations
attributes:
label: Special considerations or limitations
description: |
Provide any considerations or limitations you can think of that a contributor should take in account when coding the proposed command, and or what limitations a user will encounter or should consider when using the proposed command.
validations:
required: true
101 changes: 101 additions & 0 deletions .github/ISSUE_TEMPLATE/03_problem_with_module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Problem with the module
description: If you have a problem using this module, want to report a bug, or suggest an enhancement to this module.
labels: []
assignees: []
body:
- type: markdown
attributes:
value: |
TITLE: Please be descriptive not sensationalist.
Your feedback and support is greatly appreciated, thanks for contributing!
Please provide information regarding your issue under each section below.
**Write N/A in sections that do not apply, or if the information is not available.**
- type: textarea
id: description
attributes:
label: Problem description
description: Details of the scenario you tried and the problem that is occurring, or the enhancement you are suggesting.
validations:
required: true
- type: textarea
id: logs
attributes:
label: Verbose logs
description: |
Verbose logs showing the problem. **NOTE! Sensitive information should be obfuscated.** _Will be automatically formatted as plain text._
placeholder: |
Paste verbose logs here
render: text
validations:
required: true
- type: textarea
id: reproducible
attributes:
label: How to reproduce
description: Provide the steps to reproduce the problem.
validations:
required: true
- type: textarea
id: expectedBehavior
attributes:
label: Expected behavior
description: Describe what you expected to happen.
validations:
required: true
- type: textarea
id: currentBehavior
attributes:
label: Current behavior
description: Describe what actually happens.
validations:
required: true
- type: textarea
id: suggestedSolution
attributes:
label: Suggested solution
description: Do you have any suggestions how to solve the issue?
validations:
required: true
- type: textarea
id: targetNodeOS
attributes:
label: Operating system the target node is running
description: |
Please provide as much as possible about the node running DscResource.AnalyzerRules. _Will be automatically formatted as plain text._
To help with this information:
- On a Linux distribution, please provide the distribution name, version, and release. The following command can help get this information: `cat /etc/*-release && cat /proc/version`
- On a Windows OS please provide edition, version, build, and language. The following command can help get this information: `Get-ComputerInfo -Property @('OsName','OsOperatingSystemSKU','OSArchitecture','WindowsVersion','WindowsBuildLabEx','OsLanguage','OsMuiLanguages')`
placeholder: |
Add operating system information here
render: text
validations:
required: true
- type: textarea
id: targetNodePS
attributes:
label: PowerShell version and build the target node is running
description: |
Please provide the version and build of PowerShell the target node is running. _Will be automatically formatted as plain text._
To help with this information, please run this command: `$PSVersionTable`
placeholder: |
Add PowerShell information here
render: text
validations:
required: true
- type: textarea
id: moduleVersion
attributes:
label: Module version used
description: |
Please provide the version of the DscResource.AnalyzerRules module that was used. _Will be automatically formatted as plain text._
To help with this information, please run this command: `Get-Module -Name 'DscResource.AnalyzerRules' -ListAvailable | ft Name,Version,Path`
placeholder: |
Add module information here
render: text
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: "Virtual PowerShell User Group #DSC channel"
url: https://dsccommunity.org/community/contact/
about: "To talk to the community and maintainers of DSC Community, please visit the #DSC channel."
46 changes: 46 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!--
Thanks for submitting a Pull Request (PR) to this project.
Your contribution to this project is greatly appreciated!
Please make sure the PR title is short but a descriptive
summary of the PR,
e.g "String arrays where not allowed if it had un unsupported value map".
You may remove this comment block, and the other comment blocks,
but please keep the headers and the task list.
-->
#### Pull Request (PR) description
<!--
Replace this comment block with a description of your PR.
-->

#### This Pull Request (PR) fixes the following issues
<!--
Replace this comment block with the list of issues or n/a.
Use format:
- Fixes #123
- Fixes #124
-->

#### Task list
<!--
To aid community reviewers in reviewing and merging your PR, please take
the time to run through the below checklist and make sure your PR has
everything updated as required.
Change to [x] for each task in the task list that applies to your pull
request (PR). For those task that don't apply to you pull request (PR),
leave those as is.
-->
- [ ] Added an entry to the change log under the Unreleased section of the
file CHANGELOG.md. Entry should say what was changed and how that
affects users (if applicable), and reference the issue being resolved
(if applicable).
- [ ] Documentation added/updated in README.md.
- [ ] Comment-based help added/updated for all new/changed functions.
- [ ] Localization strings added/updated in all localization files as appropriate.
- [ ] Examples appropriately added/updated.
- [ ] Unit tests added/updated. See [DSC Community Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines).
- [ ] Integration tests added/updated (where possible). See
[DSC Community Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines).
- [ ] New/changed code adheres to [DSC Community Style Guidelines](https://dsccommunity.org/styleguidelines).
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Repository Files
- Add Issue Template.
- Add PR Template.
- Add LICENSE.md.
- Add SECURITY.md
- Add codecov config.

### Fixed

- Update build files to allow everything to work
- Update build files to include tasks for deploy
- Update pipeline to use the correct default branch
- Repository Files
- Update README including badges.
- Update references to dsccommunity fixes [#12](https://github.com/dsccommunity/DscResource.AnalyzerRules/issues/12)
and [#9](https://github.com/dsccommunity/DscResource.AnalyzerRules/issues/9).
- `DscResource.AnalyzerRules.psd1`
Expand Down
19 changes: 0 additions & 19 deletions Deploy.PSDeploy.ps1

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) DSC Community contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,30 @@

PS Script Analyzer Custom Rules for the DSC Community standards

## Make it yours
[![Build Status](https://dev.azure.com/dsccommunity/DscResource.AnalyzerRules/_apis/build/status/dsccommunity.DscResource.AnalyzerRules?branchName=main)](https://dev.azure.com/dsccommunity/DscResource.AnalyzerRules/_build/latest?definitionId=2&branchName=main)
![Azure DevOps coverage (branch)](https://img.shields.io/azure-devops/coverage/dsccommunity/DscResource.AnalyzerRules/2/main)
[![codecov](https://codecov.io/gh/dsccommunity/DscResource.AnalyzerRules/branch/main/graph/badge.svg)](https://codecov.io/gh/dsccommunity/DscResource.AnalyzerRules)
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/dsccommunity/DscResource.AnalyzerRules/2/main)](https://dsccommunity.visualstudio.com/DscResource.AnalyzerRules/_test/analytics?definitionId=2&contextType=build)
[![PowerShell Gallery (with prereleases)](https://img.shields.io/powershellgallery/vpre/DscResource.AnalyzerRules?label=DscResource.AnalyzerRules%20Preview)](https://www.powershellgallery.com/packages/DscResource.AnalyzerRules/)
[![PowerShell Gallery](https://img.shields.io/powershellgallery/v/DscResource.AnalyzerRules?label=DscResource.AnalyzerRules)](https://www.powershellgallery.com/packages/DscResource.AnalyzerRules/)

---
Generated with Plaster and the SampleModule template
## Code of Conduct

This project has adopted this [Code of Conduct](CODE_OF_CONDUCT.md).

This is a sample Readme
## Releases

## Make it yours
For each merge to the branch `main` a preview release will be
deployed to [PowerShell Gallery](https://www.powershellgallery.com/).
Periodically a release version tag will be pushed which will deploy a
full release to [PowerShell Gallery](https://www.powershellgallery.com/).

## Contributing

Please check out common DSC Community [contributing guidelines](https://dsccommunity.org/guidelines/contributing)
and the specific [Contributing to DscResource.AnalyzerRules](https://github.com/dsccommunity/DscResource.AnalyzerRules/blob/main/CONTRIBUTING.md)
guidelines.

## Change log

A full list of changes in each version can be found in the [change log](CHANGELOG.md).
2 changes: 1 addition & 1 deletion Resolve-Dependency.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
AllowPrerelease = $false
WithYAML = $true

#UseModuleFast = $true
UseModuleFast = $true
#ModuleFastVersion = '0.1.2'
#ModuleFastBleedingEdge = $true

Expand Down
36 changes: 36 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Security

The DSC Community takes the security of our modules seriously, which includes all
source code repositories managed through our GitHub organization.

If you believe you have found a security vulnerability in DscResource.AnalyzerRules, please
report it to us as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please create a [security advisory](https://github.com/dsccommunity/DscResource.AnalyzerRules/security/advisories).
Then please make one or several members of the DSC Community organization aware
that you created a security advisory. The easiest way to do so is to send us a
direct message via twitter or slack.

You should receive a response within 48 hours. If for some reason you do not,
please follow up to other member of the community.

Please include the requested information listed below (as much as you can provide)
to help us better understand the nature and scope of the possible issue:

- Type of issue
- Full paths of source file(s) related to the manifestation of the issue
- The location of the affected source code (tag/branch/commit or direct URL)
- Any special configuration required to reproduce the issue
- Step-by-step instructions to reproduce the issue
- Proof-of-concept or exploit code (if possible)
- Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

## Preferred Languages

We prefer all communications to be in English.
11 changes: 7 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ variables:
buildFolderName: output
buildArtifactName: output
testResultFolderName: testResults
testArtifactName: testResults
sourceFolderName: source
defaultBranch: main

stages:
Expand Down Expand Up @@ -245,11 +245,14 @@ stages:
arguments: '-tasks merge'
pwsh: true
- task: PublishCodeCoverageResults@1
displayName: 'Publish Azure Code Coverage'
displayName: 'Publish Code Coverage to Azure DevOps'
inputs:
codeCoverageTool: 'JaCoCo'
summaryFileLocation: '$(buildFolderName)/$(testResultFolderName)/JaCoCo_coverage.xml'
pathToSources: '$(Build.SourcesDirectory)/source/'
summaryFileLocation: '$(Build.SourcesDirectory)/$(buildFolderName)/$(testResultFolderName)/JaCoCo_coverage.xml'
pathToSources: '$(Build.SourcesDirectory)/$(sourceFolderName)/'
- script: |
bash <(curl -s https://codecov.io/bash) -f "./$(buildFolderName)/$(testResultFolderName)/JaCoCo_coverage.xml"
displayName: 'Publish Code Coverage to Codecov.io'
- stage: Deploy
dependsOn: Test
Expand Down
7 changes: 6 additions & 1 deletion build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ Pester:
ExcludeTag:
- helpQuality
Tag:
CodeCoverageThreshold: 50 # Set to 0 to bypass
CodeCoverageThreshold: 80 # Set to 0 to bypass
CodeCoverageOutputFileEncoding: ascii

CodeCoverage:
CodeCoverageMergedOutputFile: JaCoCo_coverage.xml # the file that is created for the merged code coverage
CodeCoverageFilePattern: Codecov*.xml # the pattern used to search all pipeline test job artifacts

####################################################
# PSDepend Configuration #
Expand Down
Loading

0 comments on commit 73bb393

Please sign in to comment.