-
Notifications
You must be signed in to change notification settings - Fork 898
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
[WIP] Rubocop all the things #22919
base: master
Are you sure you want to change the base?
[WIP] Rubocop all the things #22919
Conversation
@@ -205,12 +207,12 @@ | |||
def to_pdf | |||
# Create the pdf header section | |||
html_string = generate_pdf_header( | |||
:title => name.gsub(/'/, '\\\\\&'), # Escape single quotes | |||
:title => name.gsub("'", '\\\\\&'), # Escape single quotes |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, single quotes vs double quotes for the replacement string.
though, am a little confused what the original code intends.
@@ -67,7 +67,7 @@ def self.xml_to_hashes(xmlNode, findPath, typeName) | |||
nh[:acctid] = nh.delete("#{typeName}id".to_sym) | |||
nh[:acctid] = nil unless nh[:acctid].respond_to?(:to_int) || nh[:acctid].to_s =~ /^-?[0-9]+$/ | |||
# Convert to signed integer values for acctid | |||
nh[:acctid] = [nh[:acctid].to_i].pack("I").unpack("i")[0] unless nh[:acctid].nil? | |||
nh[:acctid] = [nh[:acctid].to_i].pack("I").unpack1("i") unless nh[:acctid].nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's actually correct - I agree it does look strange though.
Some comments on commits Fryguy/manageiq@3ab431e~...a0fe6fb lib/tasks/evm_automate.rake
lib/tasks/evm_plugins.rake
lib/tasks/locale.rake
lib/tasks/test.rake
product/script/export_policy_profiles.rb
spec/lib/ansible/runner/credential/machine_credential_spec.rb
spec/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script_source_spec.rb
spec/support/custom_matchers/be_same_time_as.rb
spec/tools/perf_generate.rb
|
Checked commits Fryguy/manageiq@3ab431e~...a0fe6fb with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint app/mailers/generic_mailer.rb
app/models/asset_tag_import.rb
app/models/assigned_server_role.rb
app/models/authenticator/base.rb
app/models/authenticator/httpd.rb
app/models/authenticator/ldap.rb
app/models/blacklisted_event.rb
app/models/chargeback.rb
app/models/chargeback/consumption.rb
app/models/chargeback/consumption_with_rollups.rb
app/models/chargeback/report_options.rb
app/models/chargeback_configured_system.rb
app/models/chargeback_rate.rb
app/models/chargeback_rate_detail_currency.rb
app/models/chargeback_vm.rb
app/models/classification.rb
app/models/cloud_network.rb
app/models/container_group.rb
app/models/container_replicator.rb
app/models/container_service.rb
app/models/customization_template_sysprep.rb
app/models/dialog.rb
app/models/dialog_field.rb
app/models/dialog_field_tag_control.rb
app/models/dialog_serializer.rb
app/models/ems_cluster.rb
app/models/ems_event/automate.rb
app/models/ems_refresh/link_inventory.rb
app/models/ext_management_system.rb
app/models/file_depot_ftp.rb
app/models/hardware.rb
app/models/host.rb
app/models/job.rb
app/models/lifecycle_event.rb
app/models/manageiq/providers/base_manager/event_catcher/runner.rb
app/models/manageiq/providers/cloud_manager/vm.rb
app/models/manageiq/providers/embedded_ansible/automation_manager/azure_credential.rb
app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script_source.rb
app/models/manageiq/providers/embedded_ansible/automation_manager/openstack_credential.rb
app/models/metric/ci_mixin.rb
app/models/metric/common.rb
app/models/metric/helper.rb
app/models/miq_action.rb
app/models/miq_ae_class.rb
app/models/miq_ae_field.rb
app/models/miq_ae_instance.rb
app/models/miq_ae_method.rb
app/models/miq_ae_namespace.rb
app/models/miq_ae_value.rb
app/models/miq_alert.rb
app/models/miq_automate.rb
app/models/miq_bulk_import.rb
app/models/miq_enterprise.rb
app/models/miq_policy.rb
app/models/miq_policy/import_export.rb
app/models/miq_product_feature.rb
app/models/miq_provision/custom_attributes.rb
app/models/miq_provision_request.rb
app/models/miq_provision_task.rb
app/models/miq_provision_virt_workflow.rb
app/models/miq_queue.rb
app/models/miq_report/generator.rb
app/models/miq_report/generator/async.rb
app/models/miq_report/generator/html.rb
app/models/miq_report/generator/sorting.rb
app/models/miq_report/generator/trend.rb
app/models/miq_report/import_export.rb
app/models/miq_report_result.rb
app/models/miq_request.rb
app/models/miq_request_workflow.rb
app/models/miq_request_workflow/dialog_field_validation.rb
app/models/miq_retire_task.rb
app/models/miq_schedule.rb
app/models/miq_search.rb
app/models/miq_server.rb
app/models/miq_server/log_management.rb
app/models/miq_server/role_management.rb
app/models/miq_server/worker_management/dequeue.rb
app/models/miq_server/worker_management/heartbeat.rb
app/models/miq_server/worker_management/monitor/reason.rb
app/models/miq_server/worker_management/monitor/status.rb
app/models/miq_smart_proxy_worker/runner.rb
app/models/miq_snmp.rb
app/models/miq_template.rb
app/models/miq_widget.rb
app/models/miq_worker.rb
app/models/miq_worker/runner.rb
app/models/mixins/assignment_mixin.rb
app/models/mixins/custom_attribute_mixin.rb
app/models/mixins/filterable_mixin.rb
app/models/mixins/ownership_mixin.rb
app/models/mixins/provider_object_mixin.rb
app/models/mixins/service_mixin.rb
app/models/notification.rb
app/models/openscap_result.rb
app/models/pglogical_subscription.rb
app/models/provider_tag_mapping/mapper.rb
app/models/pxe_server.rb
app/models/resource_action_workflow.rb
app/models/resource_pool.rb |
...continued
app/models/service.rb
app/models/service_reconfigure_request.rb
app/models/service_template.rb
app/models/service_template_provision_task.rb
app/models/session.rb
app/models/storage.rb
app/models/system_console.rb
app/models/vim_performance_daily.rb
app/models/vim_performance_tag.rb
app/models/vim_performance_trend.rb
app/models/vm/operations.rb
app/models/vm_or_template.rb
app/models/vm_or_template/scanning.rb
app/models/vm_scan.rb
config/preinitializer.rb
lib/ansible/runner/response.rb
lib/container_orchestrator.rb
lib/extensions/ar_adapter/ar_kill.rb
lib/extensions/ar_miq_set.rb
lib/extensions/ar_order.rb
lib/manageiq.rb
lib/manageiq/reporting/formatter/c3_helper.rb
lib/manageiq/reporting/formatter/text.rb
lib/manageiq/reporting/formatter/timeline.rb
lib/manageiq/session/memory_store_adapter.rb
lib/miq_expression.rb
lib/miq_expression/target.rb
lib/miq_ldap.rb
lib/miq_pglogical/connection_handling.rb
lib/rbac/filterer.rb
lib/remote_console/rack_server.rb
lib/task_helpers/exports/scan_profiles.rb
lib/task_helpers/imports/customization_templates.rb
lib/tasks/evm_automate.rake
lib/tasks/evm_dba.rake
lib/tasks/locale.rake
lib/tasks/test.rake
lib/vmdb/appliance.rb
lib/vmdb/plugins.rb
lib/vmdb/settings/validator.rb
lib/vmdb/util.rb
lib/workers/bin/run_single_worker.rb
product/script/export_policy_profiles.rb
spec/factories/dialog.rb
spec/factories/dialog_group.rb
spec/factories/dialog_tab.rb
spec/factories/miq_user_role.rb
spec/lib/ems_event_helper_spec.rb
spec/lib/extensions/ar_base_model_spec.rb
spec/lib/extensions/ar_base_spec.rb
spec/lib/extensions/database_configuration_spec.rb
spec/lib/rbac/filterer_spec.rb
spec/lib/task_helpers/exports/customization_templates_spec.rb
spec/lib/uuid_mixin_spec.rb
spec/models/dialog_field_serializer_spec.rb
spec/models/dialog_spec.rb
spec/models/metric_spec.rb
spec/models/miq_queue_spec.rb
spec/models/miq_report_result_spec.rb
spec/models/miq_server/worker_management/monitor/system_limits_spec.rb
spec/models/miq_server/worker_management/monitor_spec.rb
spec/models/miq_worker_spec.rb
spec/models/mixins/ansible_playbook_mixin_spec.rb
spec/models/mixins/authentication_mixin_spec.rb
spec/models/mixins/custom_actions_mixin_spec.rb
spec/models/mixins/custom_attribute_mixin_spec.rb
spec/models/mixins/external_url_spec.rb
spec/models/provider_tag_mapping_spec.rb
spec/spec_helper.rb
spec/support/custom_matchers/be_same_time_as.rb
spec/support/examples_group/shared_examples_for_ownership_mixin.rb
spec/support/miq_request_task_helper.rb
spec/support/query_counter.rb
spec/support/quota_helper.rb
spec/tools/perf_generate.rb
tools/copy_reports_structure/report_structure.rb
tools/fix_disk_sizes.rb
tools/fix_vm_relationships.rb |
...continued
tools/import_v4_provision_dialogs.rb
tools/ldap_ping.rb
tools/list_evm_snapshots.rb
tools/log_processing/ems_refresh_timings.rb
tools/log_processing/ui_request_parser.rb
tools/miq_config_sssd_ldap/cli_config.rb
tools/pg_inspector/active_connections_to_human.rb
tools/pg_inspector/active_connections_to_yaml.rb
tools/pg_inspector/servers_to_yaml.rb
tools/purge_archived_vms.rb
tools/purge_metrics.rb
tools/purge_miq_report_results.rb
tools/remove_grouping_from_report_results.rb
tools/rm_evm_snapshots.rb
tools/vim_collect_inventory.rb
|
app/models/cloud_network.rb
Outdated
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub is presenting this funny, but it's a hidden tab character being fixed to spaces.
app/models/network_port.rb
Outdated
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub is presenting this funny, but it's a hidden tab character being fixed to spaces.
raise _("Cannot call method '%{caller}' on an Account of type '%{type}'") % {:caller => caller(1..1).first[/`.*'/][1..-2], | ||
:type => accttype} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this also looks strange to me
maybe this is a performance statement where caller() only builds an array for the line in question so you don't create a large backtrace to throw away most of it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct - this prevents it from returning the entire payload
This pull request is not mergeable. Please rebase and repush. |
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
1 similar comment
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
No description provided.