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

Improve dialyzer types and checking #369

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Commits on Jan 30, 2018

  1. Make riakc_pb_socket function specs less restrictive.

    Many of the functions defined in riakc_pb_socket have specs that say
    they take a pid(), but they in fact just pass this argument to
    gen_server:call so they can take any ServerName argument that
    gen_server:call accepts.
    David Hull committed Jan 30, 2018
    Configuration menu
    Copy the full SHA
    7a4552d View commit details
    Browse the repository at this point in the history
  2. Convert user and password types in riakc_pb_socket:start_auth.

    The #state.credentials field is declared as {User::string(),
    Password::string()} but the rpbauthreq record's user and password
    fields are declared as binary.  Call iolist_to_binary to convert.
    David Hull committed Jan 30, 2018
    Configuration menu
    Copy the full SHA
    589c1b5 View commit details
    Browse the repository at this point in the history
  3. Disable some dialyzer warnings in riakc_pb_socket:process_response/3.

    Dialzyer produces errors such as the following because the code checks
    for fields containing `undefined` when the spec does not allow it.
    
    riakc_pb_socket.erl:1786: The pattern 'undefined' can never match the type [binary()]
    David Hull committed Jan 30, 2018
    Configuration menu
    Copy the full SHA
    c3f2979 View commit details
    Browse the repository at this point in the history