)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"4f65169d9a455ee78de3a9ccaca2eaab76f44a09","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"82af7d00_ac65ff02","updated":"2023-05-08 06:16:07.000000000","message":"So - does it make sense to run both baste and spellcheck at the same time?\nI think it deserves some description in the commit message what\u0027s the motivation.","commit_id":"808bdff7b99b5556d27c7709bc88b5b96a333698"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"444bab6ae795bfc1fcf78dba62d57a316f5aeded","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"a20845cb_1dac1001","in_reply_to":"297d81a9_45779609","updated":"2023-12-20 11:03:16.000000000","message":"so to answer this somehow, regarding feature overlap:\n\nshellcheck does not report the following errors, so it might be worthwhile to still run `bashate`:\n\n- E001: check that lines do not end with trailing whitespace\n- E002: ensure that indents are only spaces, and not hard tabs\n- E003: ensure all indents are a multiple of 4 spaces (a consequence of E002 imho)\n- E004: file did not end with a newline\n- E005: file does not begin with #! or have a .sh prefix (I don\u0027t understand this check, honestly.)\n- E006: check for lines longer than 79 columns\n\nWhat shellcheck actually fixes can be seen in this very changeset.\n\nI would say that bashate mostly focuses on cosmetic/readability stuff like line length, tabs vs spaces, trailing whitespaces etc.\n\nwhile these are nice checks to have to enforce consistency, these do unfortunately nothing to prevent the most common bash pitfalls I stumbled over in over 12 years of coding in bash which result in actual bugs and incorrect code in the wild that does not do what it is supposed to do:\n\n- double quoting to prevent word splitting of variables that may contain spaces\n- actual syntax checks and detection of a lot of common wrong stuff\n- detection of inefficient and brittle coding style like parsing the output of \"ls\" where better alternatives exist (e.g. find .. -exec).\n- provides links to actual examples on how to fix your code\n\nfor the full list of checks, see the wiki, it\u0027s way to long to go over it here one by one:\nhttps://www.shellcheck.net/wiki/\n\nof course we can, and I already did, silence some warnings, because as with every linter not every warning makes sense everywhere.","commit_id":"808bdff7b99b5556d27c7709bc88b5b96a333698"},{"author":{"_account_id":35218,"name":"Richard Holmboe","display_name":"rockey","email":"richard@holmboe.org","username":"rockey"},"change_message_id":"91783d79edd71a0ad67be63eb63b1146cad03c57","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"297d81a9_45779609","in_reply_to":"82af7d00_ac65ff02","updated":"2023-05-08 08:09:42.000000000","message":"baste and spellcheck, you mean bashate and shellcheck? 😊\n\ncurrently wanted to run it through ci, see what\u0027s breaking due to lots of changes in `ansible/roles/ovs-dpdk/files/ovs-dpdkctl.sh`\n\nbut i\u0027ll update commit msg to include a motivation","commit_id":"808bdff7b99b5556d27c7709bc88b5b96a333698"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"d081df69e18b3c3b04ac6d5f6415efc40e0891e5","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"c4f15eee_afdb7fc3","in_reply_to":"a20845cb_1dac1001","updated":"2023-12-21 09:23:01.000000000","message":"Actually a better example then the wiki - which just lists everything shellcheck can detect - is the gallery of bad code, which explains common bash/shell pitfalls and how shellcheck helps to avoid them:\n\nhttps://github.com/koalaman/shellcheck/blob/master/README.md#user-content-gallery-of-bad-code\n\nI found those to be very instructive and also learned something from the examples to make my bash coding a little safer.\n\nI still need to fix some stuff in our test script, because these are currently failing because of the changes.","commit_id":"808bdff7b99b5556d27c7709bc88b5b96a333698"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"be79695b47e4b08a2cb288a98718284156b352af","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"dd6a08b1_a9c23020","in_reply_to":"c4f15eee_afdb7fc3","updated":"2024-03-14 17:22:17.000000000","message":"marking this as resolved for now.","commit_id":"808bdff7b99b5556d27c7709bc88b5b96a333698"},{"author":{"_account_id":35218,"name":"Richard Holmboe","display_name":"rockey","email":"richard@holmboe.org","username":"rockey"},"change_message_id":"0dd4c4a39657fed698d3a9e153814f3191912ee5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"ebd525fc_09bf3253","updated":"2023-05-08 13:19:43.000000000","message":"recheck docker-py fixed","commit_id":"e9998268fe0316d47164d6232a6d391e46d88a49"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"444bab6ae795bfc1fcf78dba62d57a316f5aeded","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"c9969b69_674d9bae","updated":"2023-12-20 11:03:16.000000000","message":"rebased on master to fix all linter warnings in bash\n\nI can also update the commit message with more rationale, if that is desired and not self evident. I do not know the other contributors view on shellcheck. Where I\u0027m coming from it\u0027s basically a hard requirement to use it if you write bash/shell at all.\n\nBut I can of course understand if people are not familiar with it and can explain some benefits in the commit message, if it is desired. I already did list some advantages in a comment for this review.","commit_id":"96a1e2098921032ee3886bb8d55588a6bc29e8d3"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"be79695b47e4b08a2cb288a98718284156b352af","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"fb3a9ac3_4d4b54ad","updated":"2024-03-14 17:22:17.000000000","message":"rebased and fixed some stuff.","commit_id":"2198771cc5384a4c04cfec11dc127a3aaabf6c2c"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"24ad076397f750deb2c2d9e95a239bf4351eb596","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":12,"id":"92ba7d47_1061752e","updated":"2024-04-19 14:46:40.000000000","message":"can\u0027t abandon this because I\u0027m not the original owner.\n\nIt was discussed during dalmatian PTG: Resolution is, that it introduced too much churn for backports and we rather should port existing bash code to python/other languages where possible.\n\nIf someone wants to pick this up again for the remaining bash code, be advised that this probably only can get merged if you also fix all stable branches as well.","commit_id":"868ddb47245a721cac4dac6c58a4aaa4dd4d8da7"}],"lint-requirements.txt":[{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"4f65169d9a455ee78de3a9ccaca2eaab76f44a09","unresolved":true,"context_lines":[{"line_number":6,"context_line":"hacking\u003e\u003d3.0.1,\u003c3.1.0 # Apache-2.0"},{"line_number":7,"context_line":"reno\u003e\u003d3.1.0 # Apache-2.0"},{"line_number":8,"context_line":"yamllint\u003e\u003d1.22.0 #GPL3"},{"line_number":9,"context_line":"shellcheck-py # MIT"}],"source_content_type":"text/plain","patch_set":2,"id":"dd314e48_d944745a","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":13},"updated":"2023-05-08 06:16:07.000000000","message":"pin it to some major version so it doesn\u0027t break us like ansible-lint all the time","commit_id":"808bdff7b99b5556d27c7709bc88b5b96a333698"},{"author":{"_account_id":35218,"name":"Richard Holmboe","display_name":"rockey","email":"richard@holmboe.org","username":"rockey"},"change_message_id":"91783d79edd71a0ad67be63eb63b1146cad03c57","unresolved":false,"context_lines":[{"line_number":6,"context_line":"hacking\u003e\u003d3.0.1,\u003c3.1.0 # Apache-2.0"},{"line_number":7,"context_line":"reno\u003e\u003d3.1.0 # Apache-2.0"},{"line_number":8,"context_line":"yamllint\u003e\u003d1.22.0 #GPL3"},{"line_number":9,"context_line":"shellcheck-py # MIT"}],"source_content_type":"text/plain","patch_set":2,"id":"40fdf7b4_2a902af1","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":13},"in_reply_to":"dd314e48_d944745a","updated":"2023-05-08 08:09:42.000000000","message":"i\u0027ll pin to latest version","commit_id":"808bdff7b99b5556d27c7709bc88b5b96a333698"}],"tests/test-core-openstack.sh":[{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"9128e5903e831ee59db336ce2588f93ee7f4536e","unresolved":true,"context_lines":[{"line_number":166,"context_line":"        server_create_extra\u003d\"${server_create_extra} --config-drive True\""},{"line_number":167,"context_line":"    fi"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    openstack server create --wait --image cirros --flavor m1.tiny --key-name mykey --network demo-net \"${server_create_extra}\" \"${name}\""},{"line_number":170,"context_line":"    # If the status is not ACTIVE, print info and exit 1"},{"line_number":171,"context_line":"    if [[ $(openstack server show \"${name}\" -f value -c status) !\u003d \"ACTIVE\" ]]; then"},{"line_number":172,"context_line":"        echo \"FAILED: Instance is not active\""}],"source_content_type":"text/x-sh","patch_set":3,"id":"746b9c1e_1d357b42","line":169,"range":{"start_line":169,"start_character":0,"end_line":169,"end_character":42},"updated":"2023-05-16 08:54:23.000000000","message":"this fails:\n\n\u003e TESTING: Server creation\n\n+ create_instance kolla_boot_test\n\n+ local name\u003dkolla_boot_test\n\n+ local server_create_extra\n\n+ [[ 4 -eq 6 ]]\n\n+ openstack server create --wait --image cirros --flavor m1.tiny --key-name mykey --network demo-net \u0027\u0027 kolla_boot_test\n\nusage: openstack server create [-h] [-f {json,shell,table,value,yaml}]\n[...]\nopenstack server create: error: unrecognized arguments: kolla_boot_test\n\nsee here: https://zuul.opendev.org/t/openstack/build/5639e7f8a9774ca7b4e5fae9d9df7771/log/primary/logs/ansible/test-core-openstack\n\nI would rewrite it like this:\n\nfunction create_instance {\n    local name\u003d$1\n    local server_create_extra\n    if [[ $IP_VERSION -eq 6 ]]; then\n        # NOTE(yoctozepto): CirrOS has no IPv6 metadata support, hence need to use configdrive\n        server_create_extra\u003d\"${server_create_extra} --config-drive True\"\n        openstack server create --wait --image cirros --flavor m1.tiny --key-name mykey --network demo-net \"${server_create_extra}\" \"${name}\n    fi\n    openstack server create --wait --image cirros --flavor m1.tiny --key-name mykey --network demo-net \"${name}\"","commit_id":"e9998268fe0316d47164d6232a6d391e46d88a49"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"0fd3e3309e011822f4ea204448666fce07c4fdb3","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        server_create_extra\u003d\"${server_create_extra} --config-drive True\""},{"line_number":167,"context_line":"    fi"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    openstack server create --wait --image cirros --flavor m1.tiny --key-name mykey --network demo-net \"${server_create_extra}\" \"${name}\""},{"line_number":170,"context_line":"    # If the status is not ACTIVE, print info and exit 1"},{"line_number":171,"context_line":"    if [[ $(openstack server show \"${name}\" -f value -c status) !\u003d \"ACTIVE\" ]]; then"},{"line_number":172,"context_line":"        echo \"FAILED: Instance is not active\""}],"source_content_type":"text/x-sh","patch_set":3,"id":"b966abe2_8903399c","line":169,"range":{"start_line":169,"start_character":0,"end_line":169,"end_character":42},"in_reply_to":"746b9c1e_1d357b42","updated":"2024-03-20 17:06:40.000000000","message":"Done","commit_id":"e9998268fe0316d47164d6232a6d391e46d88a49"}]}
