public void execute(Project project) { if (project.getLanguage() == null) { initDeprecatedLanguage(project); } }
/** * @see org.sonar.api.batch.CheckProject#shouldExecuteOnProject(org.sonar.api.resources.Project) */ public boolean shouldExecuteOnProject(Project project) { return PHP.equals(project.getLanguage()); }
public void execute(Project project) { if (project.getLanguage() == null) { initDeprecatedLanguage(project); } }
/** * Returns <code>true</code> if the given project language is PHP and the project configuration is set to allow plugin to run. * * @param project * the project * * @return true, if should execute on project * * @see org.sonar.api.batch.CheckProject#shouldExecuteOnProject(org.sonar.api .resources.Project) */ public boolean shouldExecuteOnProject(Project project) { Configuration configuration = project.getConfiguration(); Language language = project.getLanguage(); return PHP.equals(language) && configuration.getBoolean(PDEPEND_SHOULD_RUN_PROPERTY_KEY, parseBoolean(PDEPEND_DEFAULT_SHOULD_RUN)); }
/** * Returns <code>true</code> if the given project language is PHP and the project configuration is set to allow plugin to run. * * @param project * the project * * @return true, if should execute on project * * @see org.sonar.api.batch.CheckProject#shouldExecuteOnProject(org.sonar.api .resources.Project) */ public boolean shouldExecuteOnProject(Project project) { Configuration c = project.getConfiguration(); Language language = project.getLanguage(); Boolean phpcpdShouldRun = c.getBoolean(PHPCPD_SHOULD_RUN_PROPERTY_KEY, parseBoolean(PHPCPD_DEFAULT_SHOULD_RUN)); Boolean deprecatedPhpcpdSkip = c.getBoolean(SONAR_PHP_CPD_SKIP_KEY, !phpcpdShouldRun); Boolean phpcpdSkip = c.getBoolean(PHPCPD_SKIP_PROPERTY_KEY, deprecatedPhpcpdSkip); return (PHP.equals(language) && !phpcpdSkip); }
/** * Determines whether or not this sensor will be executed on the given project. * * @param project * The project to be analyzed * @return boolean <code>true</code> if project's language is php a,d the project configuration says so, <code>false</code> in any other * case. * @see org.sonar.api.batch.CheckProject#shouldExecuteOnProject(org.sonar.api .resources.Project) */ public boolean shouldExecuteOnProject(Project project) { Configuration configuration = project.getConfiguration(); Language language = project.getLanguage(); boolean shouldExecute = PHP.equals(language); shouldExecute = shouldExecute && (configuration.getBoolean(PHPUNIT_SHOULD_RUN_PROPERTY_KEY, parseBoolean(PHPUNIT_DEFAULT_SHOULD_RUN)) || configuration .getBoolean(PHPUNIT_SHOULD_RUN_COVERAGE_PROPERTY_KEY, parseBoolean(PHPUNIT_DEFAULT_SHOULD_RUN_COVERAGE))); return shouldExecute; }
/** * Returns <code>true</code> if the given project language is PHP and the project configuration is set to allow plugin to run. * * @param project * the project * * @return true, if should execute on project * * @see org.sonar.api.batch.CheckProject#shouldExecuteOnProject(org.sonar.api .resources.Project) */ public boolean shouldExecuteOnProject(Project project) { Configuration configuration = project.getConfiguration(); Language language = project.getLanguage(); boolean result = PHP.equals(language); result = result && configuration.getBoolean(PHPCS_SHOULD_RUN_KEY, parseBoolean(PHPCS_DEFAULT_SHOULD_RUN)); result = result && (project.getReuseExistingRulesConfig() || !profile.getActiveRulesByRepository(PHPCS_REPOSITORY_KEY).isEmpty()); return result; }
/** * Returns <code>true</code> if the given project language is PHP and the project configuration is set to allow plugin to run. * * @param project * the project * * @return true, if should execute on project * * @see org.sonar.api.batch.CheckProject#shouldExecuteOnProject(org.sonar.api .resources.Project) */ public boolean shouldExecuteOnProject(Project project) { Configuration configuration = project.getConfiguration(); Language language = project.getLanguage(); boolean result = PHP.equals(language); result = result && configuration.getBoolean(PHPMD_SHOULD_RUN_KEY, parseBoolean(PHPMD_DEFAULT_SHOULD_RUN)); result = result && (project.getReuseExistingRulesConfig() || !profile.getActiveRulesByRepository(PHPMD_REPOSITORY_KEY).isEmpty()); return result; }