Skip to content
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.

Respect max_header_tokens option #5

Open
mxstbr opened this issue Mar 19, 2018 · 7 comments
Open

Respect max_header_tokens option #5

mxstbr opened this issue Mar 19, 2018 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@mxstbr
Copy link
Contributor

mxstbr commented Mar 19, 2018

Ref #4, thanks to @iamdustan who correctly pointed out that we should respect the max_header_tokens options of the .flowconfig.

Something like

const flowconfig = await danger.github.utils.fileContents('.flowconfig')
// TODO: Figure out how to parse .flowconfig somehow (why isn't it JSON ugh)
@mxstbr mxstbr added enhancement New feature or request help wanted Extra attention is needed labels Mar 19, 2018
@kevinSuttle
Copy link
Contributor

kevinSuttle commented Mar 20, 2018

We are not proud of our custom format and plan to support a better format in the future. GitHub issue #153 tracks this.

https://flow.org/en/docs/config/

facebook/flow#153 :hurtrealbad:

@kevinSuttle
Copy link
Contributor

@mxstbr
Copy link
Contributor Author

mxstbr commented Mar 20, 2018

PR please? 👼

@kevinSuttle
Copy link
Contributor

Do you have suggestions for local testing?

@mxstbr
Copy link
Contributor Author

mxstbr commented Mar 22, 2018

Mocking the Danger method, see the existing tests: https://github.com/withspectrum/danger-plugin-flow/blob/master/src/index.test.ts

@kevinSuttle
Copy link
Contributor

Yep, saw those. I haven't tested a Danger plugin before—in other words, how do I test it against a set of files as if it's a PR? Is that possible?

@mxstbr
Copy link
Contributor Author

mxstbr commented Mar 28, 2018

We don't have that kind of fancy mocking in place, I'd just check whether the requested filename is .flowconfig and return the contents of that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants