Skip to content

Comments

add find_bugs makefile target for undefined functions#4346

Merged
rnewson merged 1 commit intomainfrom
find_bugs
Jan 4, 2023
Merged

add find_bugs makefile target for undefined functions#4346
rnewson merged 1 commit intomainfrom
find_bugs

Conversation

@rnewson
Copy link
Member

@rnewson rnewson commented Jan 4, 2023

some false positives for hastings (part of geo feature not present in couchdb core) but the rest need fixin'

@rnewson
Copy link
Member Author

rnewson commented Jan 4, 2023

current output on main

 make find_bugs | grep Warn | grep -v hastin
Warning: couch_config:delete/2 is undefined function (Xref)
Warning: couch_config:get/2 is undefined function (Xref)
Warning: couch_config:parse_ini_file/1 is undefined function (Xref)
Warning: couch_config:set/3 is undefined function (Xref)
src/couch_plugins.erl:121: Warning: couch_plugins:delete_config/1 calls undefined function couch_config:delete/2 (Xref)
src/couch_plugins.erl:112: Warning: couch_plugins:load_config_file/2 calls undefined function couch_config:parse_ini_file/1 (Xref)
src/couch_plugins.erl:19: Warning: couch_plugins:plugin_dir/0 calls undefined function couch_config:get/2 (Xref)
src/couch_plugins.erl:83: Warning: couch_plugins:register_plugin/2 calls undefined function couch_config:set/3 (Xref)
src/couch_plugins.erl:117: Warning: couch_plugins:set_config/1 calls undefined function couch_config:set/3 (Xref)
src/couch_plugins.erl:87: Warning: couch_plugins:unregister_plugin/1 calls undefined function couch_config:delete/2 (Xref)
src/couch_plugins_httpd.erl:18: Warning: couch_plugins_httpd:handle_req/1 calls undefined function couch_config:get/2 (Xref)
src/couch_plugins_httpd.erl:53: Warning: couch_plugins_httpd:plugin_dir/0 calls undefined function couch_config:get/2 (Xref)
file.erl: Warning: file:delete/2 is undefined function (Xref)
src/smoosh_persist.erl:136: Warning: smoosh_persist:delete_file/1 calls undefined function file:delete/2 (Xref)
src/ioq.erl: Warning: ioq:get_disk_queues/0 is undefined function (Xref)
src/weatherreport_check_ioq.erl:88: Warning: weatherreport_check_ioq:check_legacy/1 calls undefined function ioq:get_disk_queues/0 (Xref)

@rnewson
Copy link
Member Author

rnewson commented Jan 4, 2023

the smoosh_persist one is because it uses a function only present in OTP 24 and I tested on OTP 23 which is the lowest OTP couchdb officially supports (and thus it needs fixing).

@rnewson rnewson merged commit 33ee216 into main Jan 4, 2023
@rnewson rnewson deleted the find_bugs branch January 4, 2023 23:56
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.

1 participant