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

Code Refactoring (yamllint) #33

Merged
merged 13 commits into from
Apr 16, 2020
Merged

Code Refactoring (yamllint) #33

merged 13 commits into from
Apr 16, 2020

Conversation

vitabaks
Copy link
Owner

fixed yamllint warnings/errors:

warning  too few spaces before comment  (comments)
warning  missing starting space in comment  (comments)
warning  truthy value should be one of [false, true]  (truthy)
error    line too long (N > N characters)  (line-length)
error    too many spaces inside brackets  (brackets)
error    too many spaces inside braces  (braces)
error    too many spaces after comma  (commas)
error    too many blank lines (N > N)  (empty-lines)
error    trailing spaces  (trailing-spaces)
error    wrong indentation: expected N but found N  (indentation)

fixed:
warning  too few spaces before comment  (comments)
warning  missing starting space in comment  (comments)
warning  truthy value should be one of [false, true]  (truthy)
error    line too long (N > N characters)  (line-length)
error    too many spaces inside brackets  (brackets)
error    too many spaces inside braces  (braces)
error    too many spaces after comma  (commas)
error    too many blank lines (N > N)  (empty-lines)
error    trailing spaces  (trailing-spaces)
error    wrong indentation: expected N but found N  (indentation)
@github-actions
Copy link

yamllint Failed

Show Output
./add_pgnode.yml
  27:23     warning  truthy value should be one of [false, true]  (truthy)
  30:14     error    too many spaces inside brackets  (brackets)
  30:59     error    too many spaces inside brackets  (brackets)
  34:81     error    line too long (128 > 80 characters)  (line-length)
  41:81     error    line too long (127 > 80 characters)  (line-length)
  59:14     error    too many spaces inside brackets  (brackets)
  59:23     error    too many spaces inside brackets  (brackets)
  62:14     error    too many spaces inside brackets  (brackets)
  62:31     error    too many spaces inside brackets  (brackets)
  65:14     error    too many spaces inside brackets  (brackets)
  65:34     error    too many spaces inside brackets  (brackets)
  82:81     error    line too long (107 > 80 characters)  (line-length)
  83:14     error    too many spaces inside brackets  (brackets)
  83:31     error    too many spaces inside brackets  (brackets)
  87:14     error    too many spaces inside brackets  (brackets)
  87:43     error    too many spaces inside brackets  (brackets)
  88:1      error    too many blank lines (1 > 0)  (empty-lines)

./deploy_pgcluster.yml
  3:81      error    line too long (98 > 80 characters)  (line-length)
  25:23     warning  truthy value should be one of [false, true]  (truthy)
  28:14     error    too many spaces inside brackets  (brackets)
  28:59     error    too many spaces inside brackets  (brackets)
  32:81     error    line too long (128 > 80 characters)  (line-length)
  39:81     error    line too long (127 > 80 characters)  (line-length)
  68:14     error    too many spaces inside brackets  (brackets)
  68:29     error    too many spaces inside brackets  (brackets)
  72:22     warning  truthy value should be one of [false, true]  (truthy)
  73:14     error    too many spaces inside brackets  (brackets)
  73:34     error    too many spaces inside brackets  (brackets)
  77:22     warning  truthy value should be one of [false, true]  (truthy)
  78:14     error    too many spaces inside brackets  (brackets)
  78:29     error    too many spaces inside brackets  (brackets)
  82:14     error    too many spaces inside brackets  (brackets)
  82:33     error    too many spaces inside brackets  (brackets)
  99:14     error    too many spaces inside brackets  (brackets)
  99:29     error    too many spaces inside brackets  (brackets)
  120:14    error    too many spaces inside brackets  (brackets)
  120:23    error    too many spaces inside brackets  (brackets)
  123:14    error    too many spaces inside brackets  (brackets)
  123:31    error    too many spaces inside brackets  (brackets)
  126:14    error    too many spaces inside brackets  (brackets)
  126:34    error    too many spaces inside brackets  (brackets)
  144:81    error    line too long (107 > 80 characters)  (line-length)
  145:14    error    too many spaces inside brackets  (brackets)
  145:31    error    too many spaces inside brackets  (brackets)
  162:14    error    too many spaces inside brackets  (brackets)
  162:43    error    too many spaces inside brackets  (brackets)
  163:1     error    too many blank lines (1 > 0)  (empty-lines)

./add_balancer.yml
  24:14     error    too many spaces inside brackets  (brackets)
  24:29     error    too many spaces inside brackets  (brackets)
  30:23     warning  truthy value should be one of [false, true]  (truthy)
  33:14     error    too many spaces inside brackets  (brackets)
  33:59     error    too many spaces inside brackets  (brackets)
  37:81     error    line too long (128 > 80 characters)  (line-length)
  44:81     error    line too long (127 > 80 characters)  (line-length)
  64:1      error    too many blank lines (1 > 0)  (empty-lines)

./roles/ansible-role-firewall/tasks/main.yml
  51:81     error    line too long (85 > 80 characters)  (line-length)
  56:21     warning  truthy value should be one of [false, true]  (truthy)
  57:17     warning  truthy value should be one of [false, true]  (truthy)
  58:18     warning  truthy value should be one of [false, true]  (truthy)

./vars/RedHat.yml
  203:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./vars/Debian.yml
  183:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./vars/system.yml
  4:22      warning  too few spaces before comment  (comments)
  32:1      warning  comment not indented like content  (comments-indentation)
  44:1      warning  comment not indented like content  (comments-indentation)
  138:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./vars/main.yml
  125:1     warning  comment not indented like content  (comments-indentation)
  226:1     warning  comment not indented like content  (comments-indentation)
  268:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./.github/workflows/ansible-lint.yml
  1:1       warning  missing document start "---"  (document-start)
  3:1       warning  truthy value should be one of [false, true]  (truthy)
  5:16      error    too many spaces inside brackets  (brackets)
  5:23      error    too many spaces inside brackets  (brackets)
  7:16      error    too many spaces inside brackets  (brackets)
  7:23      error    too many spaces inside brackets  (brackets)
  15:5      error    wrong indentation: expected 6 but found 4  (indentation)

./tasks/packages.yml
  91:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/sysctl.yml
  21:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/timezone.yml
  9:4       error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/ntp.yml
  66:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/keepalived.yml
  105:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/postgresql-extensions.yml
  17:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/wal-g.yml
  64:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/ssh-keys.yml
  48:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/transparent_huge_pages.yml
  34:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/pgbouncer.yml
  153:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/postgresql-databases.yml
  20:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/sudo.yml
  51:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/add-repository.yml
  70:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/configure.yml
  53:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/check_system.yml
  14:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/patroni.yml
  704:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/pam_limits.yml
  14:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/locales.yml
  30:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/postgresql-users.yml
  19:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/etcd.yml
  115:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/hostname.yml
  20:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/vip-manager.yml
  135:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/io_scheduler.yml
  19:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/confd.yml
  130:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/pip.yml
  73:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/haproxy.yml
  484:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/deploy_finish.yml
  103:4     error    no new line character at the end of file  (new-line-at-end-of-file)

Workflow: Yamllint, Action: karancodeyamllint-github-action, Lint: .

@vitabaks vitabaks changed the title Code Refactoring Code Refactoring (yamllint) Apr 16, 2020
Repository owner deleted a comment from github-actions bot Apr 16, 2020
Fixed:
./deploy_pgcluster.yml
  3:81      error    line too long (98 > 80 characters)  (line-length)
  25:23     warning  truthy value should be one of [false, true]  (truthy)
  28:14     error    too many spaces inside brackets  (brackets)
  28:59     error    too many spaces inside brackets  (brackets)
  32:81     error    line too long (128 > 80 characters)  (line-length)
  39:81     error    line too long (127 > 80 characters)  (line-length)
  68:14     error    too many spaces inside brackets  (brackets)
  68:29     error    too many spaces inside brackets  (brackets)
  72:22     warning  truthy value should be one of [false, true]  (truthy)
  73:14     error    too many spaces inside brackets  (brackets)
  73:34     error    too many spaces inside brackets  (brackets)
  77:22     warning  truthy value should be one of [false, true]  (truthy)
  78:14     error    too many spaces inside brackets  (brackets)
  78:29     error    too many spaces inside brackets  (brackets)
  82:14     error    too many spaces inside brackets  (brackets)
  82:33     error    too many spaces inside brackets  (brackets)
  99:14     error    too many spaces inside brackets  (brackets)
  99:29     error    too many spaces inside brackets  (brackets)
  120:14    error    too many spaces inside brackets  (brackets)
  120:23    error    too many spaces inside brackets  (brackets)
  123:14    error    too many spaces inside brackets  (brackets)
  123:31    error    too many spaces inside brackets  (brackets)
  126:14    error    too many spaces inside brackets  (brackets)
  126:34    error    too many spaces inside brackets  (brackets)
  144:81    error    line too long (107 > 80 characters)  (line-length)
  145:14    error    too many spaces inside brackets  (brackets)
  145:31    error    too many spaces inside brackets  (brackets)
  162:14    error    too many spaces inside brackets  (brackets)
  162:43    error    too many spaces inside brackets  (brackets)
  163:1     error    too many blank lines (1 > 0)  (empty-lines)
fixed:
./add_pgnode.yml
  27:23     warning  truthy value should be one of [false, true]  (truthy)
  30:14     error    too many spaces inside brackets  (brackets)
  30:59     error    too many spaces inside brackets  (brackets)
  34:81     error    line too long (128 > 80 characters)  (line-length)
  41:81     error    line too long (127 > 80 characters)  (line-length)
  59:14     error    too many spaces inside brackets  (brackets)
  59:23     error    too many spaces inside brackets  (brackets)
  62:14     error    too many spaces inside brackets  (brackets)
  62:31     error    too many spaces inside brackets  (brackets)
  65:14     error    too many spaces inside brackets  (brackets)
  65:34     error    too many spaces inside brackets  (brackets)
  82:81     error    line too long (107 > 80 characters)  (line-length)
  83:14     error    too many spaces inside brackets  (brackets)
  83:31     error    too many spaces inside brackets  (brackets)
  87:14     error    too many spaces inside brackets  (brackets)
  87:43     error    too many spaces inside brackets  (brackets)
  88:1      error    too many blank lines (1 > 0)  (empty-lines)
fixed:
./add_balancer.yml
  24:14     error    too many spaces inside brackets  (brackets)
  24:29     error    too many spaces inside brackets  (brackets)
  30:23     warning  truthy value should be one of [false, true]  (truthy)
  33:14     error    too many spaces inside brackets  (brackets)
  33:59     error    too many spaces inside brackets  (brackets)
  37:81     error    line too long (128 > 80 characters)  (line-length)
  44:81     error    line too long (127 > 80 characters)  (line-length)
  64:1      error    too many blank lines (1 > 0)  (empty-lines)
@github-actions
Copy link

yamllint Failed

Show Output
./vars/Debian.yml
  183:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./vars/main.yml
  125:1     warning  comment not indented like content  (comments-indentation)
  226:1     warning  comment not indented like content  (comments-indentation)
  268:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./vars/system.yml
  4:22      warning  too few spaces before comment  (comments)
  32:1      warning  comment not indented like content  (comments-indentation)
  44:1      warning  comment not indented like content  (comments-indentation)
  138:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./vars/RedHat.yml
  203:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/patroni.yml
  704:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/ntp.yml
  66:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/confd.yml
  130:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/hostname.yml
  20:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/deploy_finish.yml
  103:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/etcd.yml
  115:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/vip-manager.yml
  135:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/packages.yml
  91:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/pgbouncer.yml
  153:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/postgresql-databases.yml
  20:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/postgresql-extensions.yml
  17:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/wal-g.yml
  64:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/io_scheduler.yml
  19:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/sudo.yml
  51:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/timezone.yml
  9:4       error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/postgresql-users.yml
  19:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/pip.yml
  73:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/check_system.yml
  14:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/add-repository.yml
  70:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/transparent_huge_pages.yml
  34:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/locales.yml
  30:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/sysctl.yml
  21:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/keepalived.yml
  105:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/pam_limits.yml
  14:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/configure.yml
  53:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/haproxy.yml
  484:4     error    no new line character at the end of file  (new-line-at-end-of-file)

./tasks/ssh-keys.yml
  48:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./.github/workflows/ansible-lint.yml
  1:1       warning  missing document start "---"  (document-start)
  3:1       warning  truthy value should be one of [false, true]  (truthy)
  5:16      error    too many spaces inside brackets  (brackets)
  5:23      error    too many spaces inside brackets  (brackets)
  7:16      error    too many spaces inside brackets  (brackets)
  7:23      error    too many spaces inside brackets  (brackets)
  15:5      error    wrong indentation: expected 6 but found 4  (indentation)

./.github/workflows/yamllint.yml
  27:4      error    no new line character at the end of file  (new-line-at-end-of-file)

./roles/ansible-role-firewall/tasks/main.yml
  51:81     error    line too long (85 > 80 characters)  (line-length)
  56:21     warning  truthy value should be one of [false, true]  (truthy)
  57:17     warning  truthy value should be one of [false, true]  (truthy)
  58:18     warning  truthy value should be one of [false, true]  (truthy)

Workflow: Yamllint, Action: karancodeyamllint-github-action, Lint: .

fixed:
./roles/ansible-role-firewall/tasks/main.yml
  51:81     error    line too long (85 > 80 characters)  (line-length)
  56:21     warning  truthy value should be one of [false, true]  (truthy)
  57:17     warning  truthy value should be one of [false, true]  (truthy)
  58:18     warning  truthy value should be one of [false, true]  (truthy)
@github-actions
Copy link

yamllint Failed

Show Output
./vars/system.yml
  4:22      warning  too few spaces before comment  (comments)
  32:1      warning  comment not indented like content  (comments-indentation)
  44:1      warning  comment not indented like content  (comments-indentation)

./vars/main.yml
  125:1     warning  comment not indented like content  (comments-indentation)
  226:1     warning  comment not indented like content  (comments-indentation)

./.github/workflows/ansible-lint.yml
  1:1       warning  missing document start "---"  (document-start)
  3:1       warning  truthy value should be one of [false, true]  (truthy)
  5:16      error    too many spaces inside brackets  (brackets)
  5:23      error    too many spaces inside brackets  (brackets)
  7:16      error    too many spaces inside brackets  (brackets)
  7:23      error    too many spaces inside brackets  (brackets)
  15:5      error    wrong indentation: expected 6 but found 4  (indentation)

./.github/workflows/yamllint.yml
  31:4      error    no new line character at the end of file  (new-line-at-end-of-file)

Workflow: Yamllint, Action: karancodeyamllint-github-action, Lint: .

fix yamllint error (new-line-at-end-of-file)
Fixed:
./.github/workflows/ansible-lint.yml
  1:1       warning  missing document start "---"  (document-start)
  3:1       warning  truthy value should be one of [false, true]  (truthy)
  5:16      error    too many spaces inside brackets  (brackets)
  5:23      error    too many spaces inside brackets  (brackets)
  7:16      error    too many spaces inside brackets  (brackets)
  7:23      error    too many spaces inside brackets  (brackets)
  15:5      error    wrong indentation: expected 6 but found 4  (indentation)
@github-actions
Copy link

yamllint Success

Show Output
./vars/system.yml
  4:22      warning  too few spaces before comment  (comments)
  32:1      warning  comment not indented like content  (comments-indentation)
  44:1      warning  comment not indented like content  (comments-indentation)

./vars/main.yml
  125:1     warning  comment not indented like content  (comments-indentation)
  226:1     warning  comment not indented like content  (comments-indentation)

Workflow: Yamllint, Action: karancodeyamllint-github-action, Lint: .

Fixed:
./vars/system.yml
  4:22      warning  too few spaces before comment  (comments)
  32:1      warning  comment not indented like content  (comments-indentation)
  44:1      warning  comment not indented like content  (comments-indentation)
disable yamllint  rule:comments-indentation for main.yml variable file.
--strict      return non-zero exit code on warnings as well as errors.
@github-actions
Copy link

yamllint Success

Show Output

Workflow: Yamllint, Action: karancodeyamllint-github-action, Lint: .

@vitabaks vitabaks merged commit 0772263 into master Apr 16, 2020
@vitabaks vitabaks deleted the dev branch April 21, 2020 13:31
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.

None yet

1 participant