Add Coala linting, fix errors 61/55661/1
authorDaniel Farrell <dfarrell@redhat.com>
Thu, 30 Mar 2017 16:42:39 +0000 (12:42 -0400)
committerDaniel Farrell <dfarrell@redhat.com>
Wed, 19 Apr 2017 19:18:41 +0000 (15:18 -0400)
Also some other cleanup of the README.

Change-Id: Iafb3478d8a019739b77cd059c03b9279fed7628e
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
.coafile
README.markdown
Rakefile
spec/acceptance/nodesets/ubuntu-16-docker.yml
spec/acceptance/nodesets/ubuntu-16.yml
spec/classes/opendaylight_spec.rb
spec/spec_helper_acceptance.rb

index 14c21a538c3d01803e37da26b3808009fb3724a1..14482a8f5e68c92de8f210927c88593354268782 100644 (file)
--- a/.coafile
+++ b/.coafile
@@ -1,30 +1,53 @@
-[Default]
-ignore = .gitignore
-use_spaces = True
+[default]
+ignore = .tox/**, .git/**, .gitignore, .gitreview, **.log,
+    node_modules/**, **.sw?, **.orig, **/.vagrant**
 
-[markdown]
-bears = MarkdownBear
-files = ./**/*.markdown, ./**/*.md
-default_actions = MarkdownBear: ApplyPatchAction
+[git]
+bears = GitCommitBear
+ignore_length_regex = Signed-off-by,
+    Also-by,
+    Co-authored-by,
 
-[json]
-bears = JSONFormatBear
-files = ./**/*.json
-default_actions = JSONFormatBear: ApplyPatchAction
+[spacing]
+bears = SpaceConsistencyBear
+use_spaces = True
+enforce_newline_at_EOF = False
+files = **
+default_actions = SpaceConsistencyBear: ApplyPatchAction
+
+[linelength]
+bears = LineLengthBear
+enabled = False
+max_line_length = 100
 
 [ruby]
-bears = RuboCopBear
-files = ./**/*.rb
+bears = RubySyntaxBear, RubySmellBear, RuboCopBear
+files = **.rb
+enabled = False
 
 [puppet]
 bears = PuppetLintBear
-files = ./**/*.pp
+enabled = False
 
-[xml]
-bears = XMLBear
-files = ./**/*.xml
+[markdown]
+bears = MarkdownBear
+files = **.markdown, **.md
+default_actions = MarkdownBear: ApplyPatchAction
+
+[rest]
+bears = RSTcheckBear, reSTLintBear
+files = **.rst
 
 [yaml]
 bears = YAMLLintBear
 yamllint_config = .yamllint
-files = ./**/*.yaml, ./**/*.yml
+files = **.yaml, **.yml
+
+[json]
+bears = JSONFormatBear
+files = **.json
+default_actions = JSONFormatBear: ApplyPatchAction
+
+[xml]
+bears = XMLBear
+files = **.xml
index b7222d534ddf9eb1573b97ddcaeb952e54aa9749..e45c6b2d3b3be4539ff43bf7f3e7b316f90d8d5d 100644 (file)
@@ -8,15 +8,19 @@
 1. [Overview](#overview)
 2. [Module Description](#module-description)
 3. [Setup](#setup)
-  - [What `opendaylight` affects](#what-opendaylight-affects)
-  - [Beginning with `opendaylight`](#beginning-with-opendaylight)
+
+- [What `opendaylight` affects](#what-opendaylight-affects)
+- [Beginning with `opendaylight`](#beginning-with-opendaylight)
+
 4. [Usage](#usage)
-  - [Karaf Features](#karaf-features)
-  - [RPM Repo](#rpm-repo)
-  - [Deb Repo](#deb-repo)
-  - [Ports](#ports)
-  - [Log Verbosity](#log-verbosity)
-  - [Enabling ODL OVSDB HA](#enabling-odl-ovsdb-ha)
+
+- [Karaf Features](#karaf-features)
+- [RPM Repo](#rpm-repo)
+- [Deb Repo](#deb-repo)
+- [Ports](#ports)
+- [Log Verbosity](#log-verbosity)
+- [Enabling ODL OVSDB HA](#enabling-odl-ovsdb-ha)
+
 5. [Reference ](#reference)
 6. [Limitations](#limitations)
 7. [Development](#development)
@@ -61,48 +65,9 @@ with [applying the ODL Puppet module][12] to CentOS 7, Fedora 22, Fedora
 23 and Ubuntu 16.04 Vagrant boxes.
 
 ```
-[~/vagrant-opendaylight]$ vagrant status
-Current machine states:
-
-cent7_li_sr4              not created (virtualbox)
-cent7_be                  not created (virtualbox)
-cent7_be_sr1              not created (virtualbox)
-cent7_be_sr2              not created (virtualbox)
-cent7_rpm_he_sr4          not created (virtualbox)
-cent7_rpm_li_sr2          not created (virtualbox)
-cent7_rpm_li_sr3          not created (virtualbox)
-cent7_rpm_be              not created (virtualbox)
-cent7_rpm_be_sr1          not created (virtualbox)
-cent7_rpm_be_sr2          not created (virtualbox)
-cent7_rpm_ve_latest       not created (virtualbox)
-cent7_ansible             not created (virtualbox)
-cent7_ansible_latest      not created (virtualbox)
-cent7_ansible_path        not created (virtualbox)
-cent7_pup_rpm             not created (virtualbox)
-cent7_pup_custom_logs     not created (virtualbox)
-cent7_pup_enable_l3       not created (virtualbox)
-cent7_pup_tb              not created (virtualbox)
-f22_rpm_li                not created (virtualbox)
-f22_ansible               not created (virtualbox)
-f22_pup_rpm               not created (virtualbox)
-f23_rpm_li                not created (virtualbox)
-f23_rpm_li_sr1            not created (virtualbox)
-f23_rpm_li_sr2            not created (virtualbox)
-f23_rpm_li_sr3            not created (virtualbox)
-f23_rpm_be                not created (virtualbox)
-f23_rpm_be_rel            not created (virtualbox)
-f23_rpm_be_latest         not created (virtualbox)
-f23_ansible               not created (virtualbox)
-f23_pup_rpm               not created (virtualbox)
-debian8_ansible_repo      not created (virtualbox)
-debian8_ansible_path      not created (virtualbox)
-ubuntu16_ansible_repo     not created (virtualbox)
-ubuntu16_ansible_path     not created (virtualbox)
-ubuntu16_pup_deb          not created (virtualbox)
-
-[~/vagrant-opendaylight]$ vagrant up cent7_pup_rpm
-# A CentOS 7 VM is created and configured using the ODL Puppet mod's defaults
-[~/vagrant-opendaylight]$ vagrant ssh cent7_pup_rpm
+# Provision a CentOS VM using puppet-opendaylight
+$ vagrant up cent7_pup_rpm
+$ vagrant ssh cent7_pup_rpm
 [vagrant@localhost ~]$ sudo systemctl is-active opendaylight
 active
 ```
@@ -403,9 +368,9 @@ See our [git commit history][17] for contributor information.
 
 [2]: https://gemnasium.com/dfarrell07/puppet-opendaylight
 
-[4]: https://travis-ci.org/dfarrell07/puppet-opendaylight.svg
+[4]: https://travis-ci.org/dfarrell07/puppet-opendaylight.svg?branch=master
 
-[5]: https://gemnasium.com/dfarrell07/puppet-opendaylight.svg
+[5]: https://gemnasium.com/dfarrell07/puppet-opendaylight.svg?branch=master
 
 [7]: http://www.opendaylight.org/
 
@@ -429,8 +394,8 @@ See our [git commit history][17] for contributor information.
 
 [17]: https://github.com/dfarrell07/puppet-opendaylight/commits/master
 
-[18]: <http://cbs.centos.org/repos/nfv7-opendaylight-40-release/x86_64/os/Packages/> "OpenDaylight Beryllium CentOS CBS repo"
+[18]: http://cbs.centos.org/repos/nfv7-opendaylight-40-release/x86_64/os/Packages/ "OpenDaylight Beryllium CentOS CBS repo"
 
-[19]: <https://wiki.opendaylight.org/view/Deployment#RPM> "OpenDaylight RPMs and their repos"
+[19]: https://wiki.opendaylight.org/view/Deployment#RPM "OpenDaylight RPMs and their repos"
 
 [20]: https://launchpad.net/~odl-team/+archive/ubuntu/boron
index 0a8129290b709527976e22cf239b4e8f754a2dd9..2ae6b9b216efac1172a0190d4dbd6c7fb1ed5a98 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -46,8 +46,6 @@ task :travis_lint do
   sh 'echo "y" | travis lint .travis.yml --debug'
 end
 
-# TODO: Add Coala helper
-
 # CentOS VMs
 
 desc "Beaker tests against CentOS 7 VM with latest Boron testing RPM"
index 329e1ae9d640d33b83a36a4e119e83834b0cef72..e29998b5b6bb292a2612d05c98cb8fbc3b43e3c6 100644 (file)
@@ -1,3 +1,4 @@
+---
 HOSTS:
   ubuntu-16-docker:
     roles:
index de8b3edffbf02bf8afe48f188dda257aa3dbcc60..3f9091d18c94479022fa8d0f570aa548f45a718c 100644 (file)
@@ -4,7 +4,7 @@ HOSTS:
     roles:
       - master
     platform: ubuntu-1604-x86_64
-    box:  puphpet/ubuntu1604-x64
+    box: puphpet/ubuntu1604-x64
     box_url: https://atlas.hashicorp.com/puphpet/boxes/ubuntu1604-x64
     hypervisor: vagrant
 CONFIG:
index 895f94d84033b2c84f30b4e48efad60d93e22b07..18a69e5716c71a8b018338950be40f9481399c36 100644 (file)
@@ -559,7 +559,7 @@ describe 'opendaylight' do
       operatingsystemrelease = '16.04'
       operatingsystemmajrelease = '16'
       lsbdistcodename = 'xenial'
-      
+
       context 'installing Deb' do
         let(:facts) {{
           :osfamily => osfamily,
index 6b96e99f76ed0e14fa33a35e1cf0ededff12e37f..23696c698bb4b3f826552e26dc427aac137d8e7c 100644 (file)
@@ -182,7 +182,7 @@ def generic_validations()
       it { should be_installed }
     end
 
-  # Ubuntu 16.04 specific validation  
+  # Ubuntu 16.04 specific validation
   elsif ['ubuntu-16', 'ubuntu-16-docker'].include? ENV['RS_SET']
 
     # Verify ODL systemd .service file