Skip to content

Commit

Permalink
Add coala support and fix/lint files
Browse files Browse the repository at this point in the history
Additional dependencies - puppet-lint, xmllint, rubocop

Only very obvious changes have been made, ignoring
class-name, line-length, string-literal related warnings

Signed-off-by: Umesh Singla <[email protected]>
  • Loading branch information
umeshksingla committed Dec 21, 2016
1 parent 178ec5b commit 9152752
Show file tree
Hide file tree
Showing 19 changed files with 279 additions and 156 deletions.
30 changes: 30 additions & 0 deletions .coafile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[Default]
ignore = .gitignore
use_spaces = True

[markdown]
bears = MarkdownBear
files = ./**/*.markdown, ./**/*.md
default_actions = MarkdownBear: ApplyPatchAction

[json]
bears = JSONFormatBear
files = ./**/*.json
default_actions = JSONFormatBear: ApplyPatchAction

[ruby]
bears = RuboCopBear
files = ./**/*.rb

[puppet]
bears = PuppetLintBear
files = ./**/*.pp

[xml]
bears = XMLBear
files = ./**/*.xml

[yaml]
bears = YAMLLintBear
yamllint_config = .yamllint
files = ./**/*.yaml, ./**/*.yml
1 change: 1 addition & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
fixtures:
repositories:
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
Expand Down
26 changes: 13 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ env:
- PUPPET_VERSION="~> 4.3.0"
matrix:
exclude:
- rvm: 2.2.3
env: PUPPET_VERSION="~> 3.4.0"
- rvm: 2.2.3
env: PUPPET_VERSION="~> 3.5.0"
- rvm: 2.2.3
env: PUPPET_VERSION="~> 3.6.0"
- rvm: 2.2.3
env: PUPPET_VERSION="~> 3.7.0"
- rvm: 2.2.3
env: PUPPET_VERSION="~> 3.4.0"
- rvm: 2.2.3
env: PUPPET_VERSION="~> 3.5.0"
- rvm: 2.2.3
env: PUPPET_VERSION="~> 3.6.0"
- rvm: 2.2.3
env: PUPPET_VERSION="~> 3.7.0"
notifications:
email:
recipients:
- [email protected]
on_success: change
on_failure: change
email:
recipients:
- [email protected]
on_success: change
on_failure: change
45 changes: 45 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
rules:
braces:
min-spaces-inside: 0
max-spaces-inside: 0
brackets:
min-spaces-inside: 0
max-spaces-inside: 0
colons:
max-spaces-before: 0
max-spaces-after: 1
commas:
max-spaces-before: 0
min-spaces-after: 1
max-spaces-after: 1
comments:
level: warning
require-starting-space: true
min-spaces-from-content: 2
comments-indentation:
level: warning
document-end: disable
document-start:
level: warning
present: true
empty-lines:
max: 2
max-start: 0
max-end: 0
hyphens:
max-spaces-after: 1
indentation:
spaces: consistent
indent-sequences: true
check-multi-line-strings: false
key-duplicates: enable
line-length:
max: 80
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true
new-line-at-end-of-file: enable
new-lines:
type: unix
trailing-spaces: enable
truthy: disable
74 changes: 47 additions & 27 deletions CONTRIBUTING.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ We work to make contributing easy. Please let us know if you spot something
we can do better.

#### Table of Contents

1. [Overview](#overview)
1. [Communication](#communication)
* [Issues](#issues)
* [IRC channel](#irc-channel)
1. [Patches](#patches)
1. [Testing](#testing)
* [Test Dependencies](#test-dependencies)
* [Syntax and Style Tests](#syntax-and-style-tests)
* [Unit Tests](#unit-tests)
* [System Tests](#system-tests)
* [Tests in Continuous Integration](#tests-in-continuous-integration)
2. [Communication](#communication)
- [Issues](#issues)
- [IRC channel](#irc-channel)
3. [Patches](#patches)
4. [Testing](#testing)
- [Test Dependencies](#test-dependencies)
- [Syntax and Style Tests](#syntax-and-style-tests)
- [Unit Tests](#unit-tests)
- [System Tests](#system-tests)
- [Tests in Continuous Integration](#tests-in-continuous-integration)

## Overview

Expand Down Expand Up @@ -71,24 +72,26 @@ Feel free to join us at **#opendaylight-integration** on `chat.freenode.net`. Yo
Please use [Pull Requests][2] to submit patches.

Basics of a pull request:
* Use the GitHub web UI to fork our repo.
* Clone your fork to your local system.
* Make your changes.
* Commit your changes, using a [good commit message][7] and referencing any
applicable issues.
* Push your commit.
* Submit a pull request against the project, again using GitHub's web UI.
* We'll give feedback and get your changed merged ASAP.
* You contributed! [Thank you][8]!

- Use the GitHub web UI to fork our repo.
- Clone your fork to your local system.
- Make your changes.
- Commit your changes, using a [good commit message][7] and referencing any
applicable issues.
- Push your commit.
- Submit a pull request against the project, again using GitHub's web UI.
- We'll give feedback and get your changed merged ASAP.
- You contributed! [Thank you][8]!

Other tips for submitting excellent pull requests:
* If you'd like to make more than one logically distinct change, please submit
them as different pull requests (if they don't depend on each other) or
different commits in the same PR (if they do).
* If your PR contains a number of commits that provide one logical change,
please squash them using `git rebase`.
* Please provide test coverage for your changes.
* If applicable, please provide documentation updates to reflect your changes.

- If you'd like to make more than one logically distinct change, please submit
them as different pull requests (if they don't depend on each other) or
different commits in the same PR (if they do).
- If your PR contains a number of commits that provide one logical change,
please squash them using `git rebase`.
- Please provide test coverage for your changes.
- If applicable, please provide documentation updates to reflect your changes.

## Testing

Expand Down Expand Up @@ -212,23 +215,40 @@ We use [Travis CI][16] to run our unit, syntax and style tests against a
matrix of supported Ruby and Puppet versions at every commit. This currently
results in >8500 automated tests per commit.


[1]: https://github.com/dfarrell07/puppet-opendaylight/issues

[2]: https://github.com/dfarrell07/puppet-opendaylight/pulls

[3]: https://github.com/dfarrell07/puppet-opendaylight/labels/good-for-beginners

[4]: https://github.com/dfarrell07/puppet-opendaylight/labels/prio%3Ahigh

[5]: https://github.com/dfarrell07/puppet-opendaylight/labels/prio%3Anormal

[6]: https://help.github.com/articles/closing-issues-via-commit-messages/

[7]: http://chris.beams.io/posts/git-commit/

[8]: http://cdn3.volusion.com/74gtv.tjme9/v/vspfiles/photos/Delicious%20Dozen-1.jpg

[9]: http://bundler.io/

[10]: http://puppet-lint.com/

[11]: https://github.com/gds-operations/puppet-syntax

[12]: https://github.com/puppet-community/metadata-json-lint

[13]: https://github.com/puppetlabs/beaker

[14]: http://serverspec.org/resource_types.html

[15]: https://github.com/puppetlabs/beaker/wiki/How-to-Write-a-Beaker-Test-for-a-Module#typical-workflow

[16]: https://travis-ci.org/dfarrell07/puppet-opendaylight

[17]: https://www.vagrantup.com/downloads.html

[18]: www.virtualbox.org/wiki/Linux_Downloads

[19]: http://webchat.freenode.net/?channels=opendaylight-integration
Loading

0 comments on commit 9152752

Please sign in to comment.