/** * Add all the check pass that are possibly relevant to a non googler. * * @param options The CompilerOptions object to set the options on. */ private static void addVerboseWarnings(CompilerOptions options) { addDefaultWarnings(options); // checkSuspiciousCode needs to be enabled for CheckGlobalThis to get run. options.checkSuspiciousCode = true; options.checkGlobalThisLevel = CheckLevel.WARNING; options.checkSymbols = true; options.checkMissingReturn = CheckLevel.WARNING; // checkTypes has the side-effect of asserting that the // correct number of arguments are passed to a function. // Because the CodingConvention used with the web service does not provide a // way for optional arguments to be specified, these warnings may result in // false positives. options.checkTypes = true; options.checkGlobalNamesLevel = CheckLevel.WARNING; options.aggressiveVarCheck = CheckLevel.WARNING; options.setWarningLevel(DiagnosticGroups.MISSING_PROPERTIES, CheckLevel.WARNING); options.setWarningLevel(DiagnosticGroups.DEPRECATED, CheckLevel.WARNING); }