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.

Please bear in mind that code intelligence is applied to every revision and may contribute to slow indexing and page load performance, especially in big projects.

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:

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.

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.

If your existing Maven settings might differ from the default, make sure to specify them in this field, otherwise when running Upsource under a different user (as a service, for instance) these settings might not be recognised.

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:

In the <upsource_home>/conf directory, create a file upsource.user.properties

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)

Create the environment variable ANDROID_HOME with a path to the directory containing Android SDK.

Only basic Java and Kotlin code intelligence is available. Android Studio-specific inspections are not supported.

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.