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

Type consistancy #3

Open
jmervine opened this issue Jun 30, 2016 · 4 comments
Open

Type consistancy #3

jmervine opened this issue Jun 30, 2016 · 4 comments

Comments

@jmervine
Copy link

Hey, it would be super helpful if int's where int's and string's where string's. For example in this output from /reports/stats.json/hourly where size, hit, noncache_hit and cache_hit should all be int's.

{
  "size": "1842522767850",
  "hit": "69267643",
  "noncache_hit": "297111",
  "cache_hit": "68970532",
  "timestamp": "2016-06-01 01:00:00"
}
@jdorfman
Copy link
Member

@jmervine we are discussing this in Slack ATM. Will update asap.

@jdorfman
Copy link
Member

@jmervine let's get a list of strings and ints that are wrongfully labeled. I can then up in a ticket.

@jmervine
Copy link
Author

jmervine commented Jul 1, 2016

Assuming the docs are correct, in the clone, you can run...

# find all numbers with quotes around them and their line numbers and file names...
$ find _includes -type f -name "*.md" | xargs grep -E '\"([0-9]+)\"'

# just the file names...
$ find _includes -type f -name "*.md" | xargs grep -l -Eo '\"([0-9]+)\"'

There will be lots of things in the output you can ignore, but it should be a good starting point.

@jmervine
Copy link
Author

jmervine commented Jul 1, 2016

This will pull out just the key/value pairs, but doesn't include the endpoints, so I'm not sure how helpful that is...

$ find _includes -type f -name "*.md" | xargs grep -E '\"([0-9]+)\"' | grep '"\":\"\|\": \"' | grep -v "params ="

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

No branches or pull requests

2 participants