Upsource 2017.3 Help

Creating a project - Code intelligence

Enable code intelligence: Upsource will be able to execute static code analysis in your repository and provide related features including displaying code issues, "Find usages", "Go to Declaration" etc.

Consider this option only if you are working on a project that uses Java, JavaScript, PHP, Python, or Kotlin, as code analysis is only supported for these languages at this point. If you are working on a project that doesn't use these languages, you are safe to leave it disabled.

With code intelligence enabled, specify the following:

Run code inspections: Upsource will detect and visualise compiler and runtime errors as well as less severe issues like typos or dead code. See Displaying code inspections in files for details.

Convert project model: Specify the build system that is used in your project.

  • Choose Do not convert:
    1. If an IDEA-based IDE is used to maintain code regardless of the build system, and if the project's .idea folder is committed into your repository (for example, if your project is built with Ant but you're using an IntelliJ IDEA-based IDE, then IntelliJ IDEA would be your choice of build system.).

      If your team developers configure their IDE so each has different .idea folder, it's still recommended to store most of the .idea folder contents in version control, only omitting the user-specific settings, such as .idea/workspace.xml and .idea/shelf. Otherwise Upsource will not be able to provide code insight for your project.

    2. For any PHP/JavaScript projects
  • If Maven is selected as build system:
    • Directory containing pom.xml: Enter a path to the parent _pom.xml_ file (relative to project root). Leave the field blank, if the file is in the root directory. If your project modules are hosted in multiple repositories (e.g. each module in their own repository), you can configure them all in one Upsource project, and keep the parent pom.xml in the first repo.
    • Maven settings: If your project requires non-standard Maven settings, paste the content of your maven-settings.xml here (up to 20KB).

    • Maven profiles: Specify required Maven profiles here.

    • Model conversion system properties: If your project requires additional Java system properties for the conversion, you can specify them in this field.

  • If Gradle is selected as build system:

    • Directory containing Gradle files: enter the path to the directory containing the build.gradle file (relative to project root). Leave the field blank, if the file is in the root directory.

    • Gradle properties: Specify required Gradle properties here.

    • Gradle init script: Enter Gradle init script here.

    If you're planning to work on Gradle projects without a wrapper:

    1. In the <upsource_home>/conf directory, create a file upsource.user.properties
    2. Add the following line to that file: gradle.home.directory=<gradle_home>. Use double backslashes in the specified path (e.g. C:\\Users\\Jet\\Gradle)
    3. Restart Upsource
  • JavaScript version: Specify the version if JavaScript is used in your project.

    To enable code intelligence for dependencies listed in package.json, Node.js, npm, and Yarn should be installed on the Upsource server.

  • Python support: Specify the version if Python is used in your project. Python should be installed on the Upsource server.

  • PHP support: Specify the version if PHP is used in your project. PHP should be installed on the Upsource server.

    Code insights can be extended if PHP Composer is used in your project. In order for Upsource to recognize it, the main Composer configuration file composer.json should be located in the root of the project repository.

Last modified: 28 February 2018