I'm using qooxdoo in combination with the google maps API. I'm actually using it in combination with coffeescript, but I had the same problem before I moved over to coffeescript (although I suspect coffeescript isn't helping).
When I build the project, I get a lot of lines like this:
- Warning: myproj.App (22,50): Unknown global symbol used: 'google'
- Warning: myproj.App (22,76): Unknown global symbol used: 'google.maps'
- Warning: myproj.App (23,21): Unknown global symbol used: 'google'
- Warning: myproj.App (23,47): Unknown global symbol used: 'google'
- Warning: myproj.App (23,74): Unknown global symbol used: 'google.maps'
- Warning: myproj.App (15,18): Unknown global symbol used: 'google.maps.LatLng'
I've found lots of references to @ignoreUndefined
or @ignore
to get rid of this, all supposed to be placed in a javadoc comment like this:
/**
* @ignore(google.*)
*/
However, I've been unable to get this to work. I've tried @ignoreUndefined and @ignore, with and without brackets, with google
on it's own, with google.
with google*
, with google.*
, with google.maps.LatLng
explicitly (and all the other ones) and a few other variations. In the coffeescript I've tried having it all in a ###
block and also in a block at the top of the file that looks like this:
`/**
* @ignoreUndefined google
*/`
or
`/** @ignore(google) */`
(the backticks stick it straight into the javascript source unmolested).
What I really want to do is put something in config.json
that tells it to stop complaining about google.* (this would be simpler than per-file as it will be in every file), but I can't find a way to do this. It's starting to be a problem as I'm missing genuine mistakes amongst the pages of Unknown global symbol used: 'google
...
Please can anyone tell me what I'm doing wrong?
Edit
Thanks to Richard, I now have it working. In case it's of use to anyone else, my config.json looks like this (irrelevant bits removed):
{
...
"config-warnings" :
{
"job-shadowing": ["common", "lint", "source-all", "build"]
},
"jobs" :
{
"build" :
{
"run" :
[
"coffee-compile",
"build-resources",
"build-script",
"build-files"
]
},
"source-all" :
{
"run" :
[
"coffee-compile",
"source-all-script"
]
},
"common":
{
"lint-check": {
"allowed-globals": [
"google"
]
}
},
"lint":
{
"lint-check": {
"allowed-globals": [
"google"
]
}
},
"coffee-compile" :
{
"extend": ["common"],
"shell" :
{
"command": "coffee --bare --compile --output ./source/class/myapp/ ./coffee/myapp/*.coffee"
}
}
}
}