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

Enable Dialyzer #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

fhunleth
Copy link
Contributor

There are a few Dialyzer warnings in x509. If you'd like to take a look, this change should get you started.

@voltone
Copy link
Owner

voltone commented Jan 8, 2019

Thanks, I finally had some time to play with this.

Unfortunately it seems many of the :public_key types I was referencing in the typespecs are actually not exported, even though they are mentioned in the docs. So while those references are useful for the purpose of documentation (they highlight how X509 interworks with :public_key), Dialyzer chokes on them.

Replacing those references with new types in X509.ASN1 not only makes it harder to match types with the :public_key docs, it also necessitates documenting the ASN1 module.

Need to think about this some more. Having said all that, Dialyzer did find some real issues in my specs.

@fhunleth
Copy link
Contributor Author

fhunleth commented Jan 9, 2019

I'm of the opinion that some Dialyzer is better than no Dialyzer. If you've had your fill for now, you can always add an ignore file. My dialyzer.ignore for projects using X509 seems to be this currently:

:0: Unknown type 'Elixir.X509.ASN1':record/1
:0: Unknown type public_key:ec_private_key/0
:0: Unknown type public_key:ec_public_key/0
:0: Unknown type public_key:rsa_private_key/0
:0: Unknown type public_key:rsa_public_key/0
:0: Unknown type public_key:issuer_name/0

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.

2 participants