summaryrefslogtreecommitdiffstats
path: root/tools/BUILD
Commit message (Collapse)AuthorAgeFilesLines
* Bazel: Add support for JDK 21David Ostrovsky2024-05-021-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two failing tests when switching to JDK 21. One failure is related to the changed behaviour related to the locale providers. Adapt `GitDateFormatterTest` to changes in unicode [1]. Second failure related to changed behaviour in URL.openConnection(), see: [2] for more details. Before JDK 20, some of the parsing/validation performed by the JDK built-in URLStreamHander implementations were delayed until URL::openConnection or URLConnection::connect was called. Starting JDK 20, some of these parsing/validations are now performed early, i.e. within URL constructors. IOW, the assumption made in HttpSupport.TesttestMalformedUri() isn't met any more: providing mailformed URI to the URL ctor now throws an exception starting with JDK 20. To rectify the problem, remove the offending test. Test plan: To build with JDK 21 and run the tests locally: $> bazel test --config=java21 //... To build with JDK 21 and run the tests on RBE: $> bazel test --config=remote21 --remote_instance_name=$PROJECT //... [1] https://bugs.openjdk.org/browse/JDK-8304925 [2] https://bugs.openjdk.org/browse/JDK-8293590 Change-Id: I796de67f7945d5f1fa5e8146f4ec8cbe9ac7bd3e
* [errorprone] Fix pattern ModifiedButNotUsedMatthias Sohn2024-04-291-1/+1
| | | | | | See https://errorprone.info/bugpattern/ModifiedButNotUsed Change-Id: I3bd3f865d50a26af6c594391de5adf35230c984f
* [errorprone] Fix pattern CatchAndPrintStackTraceMatthias Sohn2024-04-291-1/+1
| | | | | | See https://errorprone.info/bugpattern/CatchAndPrintStackTrace Change-Id: I7a6698293d1485f384c275bf7e4dcddc529af4a1
* [errorprone] Fix pattern FutureReturnValueIgnoredMatthias Sohn2024-04-291-1/+1
| | | | | | See https://errorprone.info/bugpattern/FutureReturnValueIgnored Change-Id: I7225fd6388ce70ed5eea9e61b29bd10e1a927acb
* [errorprone] Fix pattern BadImportMatthias Sohn2024-04-291-1/+1
| | | | | | See https://errorprone.info/bugpattern/BadImport Change-Id: I24e5a7a4a64d8b3cf2cc3d394090ce90e849f9f9
* [errorprone] Fix pattern UseCorrectAssertInTestsMatthias Sohn2024-04-291-1/+1
| | | | | | See https://errorprone.info/bugpattern/UseCorrectAssertInTests Change-Id: Iffde63ac795ad30c3e7774764cb8189cb089ed86
* [errorprone] Fix pattern ProtectedMembersInFinalClassMatthias Sohn2024-04-291-1/+1
| | | | | | See https://errorprone.info/bugpattern/ProtectedMembersInFinalClass Change-Id: I5993093ca012f091dfe8ee1f2099b9596c2ee697
* [errorprone] Fix pattern CatchFailMatthias Sohn2024-04-291-1/+1
| | | | | | See https://errorprone.info/bugpattern/CatchFail Change-Id: If1c637a420c4e669a5bdbe4abcefc5c3a2b3a43b
* [errorprone] Fix pattern see UnusedVariableMatthias Sohn2024-04-291-1/+1
| | | | | | See https://errorprone.info/bugpattern/UnusedVariable Change-Id: I75d7602af31ed7d3264d2beab2d159cfbf29e7cb
* [errorprone] Fix pattern LongLiteralLowerCaseSuffixMatthias Sohn2024-04-291-1/+1
| | | | | | See https://errorprone.info/bugpattern/LongLiteralLowerCaseSuffix Change-Id: I139eadef5d66dfed2952ba9e1c91b3fe83259e97
* [errorprone] Fix error pattern JdkObsoleteMatthias Sohn2024-04-291-1/+1
| | | | | | See https://errorprone.info/bugpattern/JdkObsolete Change-Id: Id105e2695eb64523bd217f507bf95f909bc6b348
* [errorprone] Fix UnnecessaryParentheses errorsMatthias Sohn2024-04-281-1/+1
| | | | | | See https://errorprone.info/bugpattern/UnnecessaryParentheses Change-Id: I783fd24286ec1bd55efbf21d05758465f4af87ee
* Make the tests buildable by bazel testKamil Musin2023-11-231-17/+17
| | | | | | | | | | | | | | | | All the errorprone checkers fail in many existing places of the codebase, making it impossible to run bazel test. Downgrade all to ":WARN". MergeToolTest is asserting a wrong error line, but the line seems different between bazel and mvn test runs. Therefore we don't fix it and simply run ``` bazel test -- //... -//org.eclipse.jgit.pgm.test:pgm ``` Change-Id: I44913ebc70dcc934cb69481cc3ff9ae0d8059707
* Activate additional error prone checksDavid Ostrovsky2023-09-251-12/+340
| | | | | Change-Id: I1b351e04da9f08681f08aae9ce984c3d3285e88e Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* tools/BUILD: Sort errorprone rules alphabeticallyMatthias Sohn2023-09-221-7/+7
| | | | Change-Id: I006940eb8a7710d5b8ea66c6f805f0dd08e62a31
* Bump bazel vesion to 6.2.0David Ostrovsky2023-05-291-1/+1
| | | | | | | | | | | | Also demote severity level for bug pattern: PreferredInterfaceType, aka MutableConstantField: [1] from error to warning. Also fix DoubleBraceInitialization error prone bug pattern [2]. [1] https://errorprone.info/bugpattern/PreferredInterfaceType [2] https://errorprone.info/bugpattern/DoubleBraceInitialization Change-Id: I04b7d0792e67cbc51e3939bd47c2ea13a685cf0d
* Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2023-04-261-3/+3
|\ | | | | | | | | | | | | | | | | * stable-6.0: [bazel] Skip ConfigTest#testCommitTemplatePathInHomeDirecory Demote severity of some error prone bug patterns to warnings UploadPack: Fix NPE when traversing a tag chain Change-Id: I5e13d5b5414aef97e518898166bfa166c692e60f
| * Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2023-04-261-3/+3
| |\ | | | | | | | | | | | | | | | | | | | | | * stable-5.13: [bazel] Skip ConfigTest#testCommitTemplatePathInHomeDirecory Demote severity of some error prone bug patterns to warnings Change-Id: I63b9adc22e1e1d9a9c754fe070ddfe21a52446c7
| | * Demote severity of some error prone bug patterns to warningsDavid Ostrovsky2023-04-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code is not violation free, so demote the severity of these bug patterns to warning: o DefaultCharset o FutureReturnValueIgnored o UnusedException Change-Id: Ie886a4a247770a74953385f018498ac2515ed209
* | | Bazel: Switch to using toolchain resolution for java rulesDavid Ostrovsky2022-01-201-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump Bazel version to release 5.0.0. In this new Bazel release, --incompatible_use_toolchain_resolution_for_java_rules is flipped, that means that the build must be adapted to toolchain resolution. Specification toolchain resolution for java rules is here: [1]. Main tracking Bazel issue is here: [2]. Given that new Bazel release also added support for remote JDK 17, add experimental support for building with remote JDK 17 to produce major byte code version 61. Test Plan: To build with remote JDK 11 run: $ bazel build :all To build with remote JDK 17 run: $ bazel build --config java17 :all [1] https://docs.google.com/document/d/1MVbBxbKVKRJJY7DnkptHpvz7ROhyAYy4a-TZ-n7Q0r4/edit?usp=sharing [2] https://github.com/bazelbuild/bazel/issues/7849 Change-Id: I8d26dff722c6677ea7642913b61e416b23ea9041
* | | Bazel: Simplify java 11 toolchain definitionDavid Ostrovsky2022-01-201-20/+2
| | | | | | | | | | | | | | | | | | Also remove unused JDK9_JVM_OPTS constant. Change-Id: I0f45ca8312a2a8c3aee3855e3ef3afa95808b4ad
* | | Bazel: Add missing java packages to error_prone package groupDavid Ostrovsky2022-01-201-3/+8
|/ / | | | | | | Change-Id: I709a3cd2639e9209b2c92c700e04ab4c90ed0524
* | sshd: add support for ssh-agentThomas Wolf2021-11-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a simple SSH agent connector using JNA. Include com.sum.jna and com.sun.jna.platform in the target platform. JNA is used to communicate through Unix domain sockets with ssh-agent, and if on Windows, to communicate via shared memory with Pageant. The new bundle o.e.j.ssh.apache.agent is an OSGi fragment so that the java.util.ServiceLoader can find the provided factory without further ado in OSGi environments. Adapt both maven and bazel builds to include the new bundle. Manually tested on OS X, CentOS 7, and Win10 with Pageant 0.76. Tested by installing JGit built from this change into freshly downloaded Eclipse 2021-12 M1, and then doing git fetches via SSH with different ~/.ssh/config settings (explicit IdentityFile, without any but a key in the agent, with no keys and a key in the agent and IdentitiesOnly=yes (must fail)). Bug: 541274 Bug: 541275 Change-Id: I34e85467293707dbad1eb44d1f40fc2e70ba3622 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | [releng] bazel: Enable errorprone on o.e.j.ssh.apacheThomas Wolf2021-11-031-0/+1
| | | | | | | | | | | | Fix the few issues reported. (None serious.) Change-Id: I8d72ef7d425ab61f4c27b657c92fc021850730d6 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | [releng] Make the bazel build use Java 11Thomas Wolf2021-11-031-1/+18
|/ | | | | | | Make the default toolchain use Java 11, and fix two errorprone findings introduced recently. Change-Id: Iff51206fe8bdf096cb7d88cb1a499002550766cd Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* ErrorProne: Enable and fix UnusedException checkDavid Pursehouse2020-01-271-0/+1
| | | | | | | | | | | | | | | | | | | | | Enable UnusedException at ERROR level which causes the build to fail in many places with: [UnusedException] This catch block catches an symbol and re-throws another, but swallows the caught symbol rather than setting it as a cause. This can make debugging harder. Fix it by setting the caught exception as cause on the subsequently thrown exception. Note: The grammatically incorrect error message is copy-pasted as-is from the version of ErrorProne currently used in Bazel; it has been fixed by [1] in the latest version. [1] https://github.com/google/error-prone/commit/d57a39c Change-Id: I11ed38243091fc12f64f1b2db404ba3f1d2e98b5 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove Error-Prone ExpectedExceptionCheckerDavid Pursehouse2020-01-241-1/+0
| | | | | | | | | The checker only checks for misuse of ExpectedException. Since we've moved to JUnit 4.13 and assertThrows, ExpectedException won't be used at all, so now we can get rid of that setting. Change-Id: Ia9189936ae215110f1f5fc6459c5dbc944404ade Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Merge branch 'stable-5.3' into stable-5.4Matthias Sohn2019-09-081-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Format BUILD files with buildifier [error prone] Suppress NonAtomicVolatileUpdate in SimpleLruCache Bazel: Format BUILD files with buildifier Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Bazel: Fix warning about deprecated lib.bzl Format lib/BUILD with buildifier Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Bazel: Bump minimum supported version to 0.29.0 Bazel: Bump skylib library version to 0.8.0 Use bazelisk to switch between used bazel version Bazel: Require minimum bazel version 0.17.1 Fix wrong placeholder index in error message packInaccessible JGitText: Remove unused externalized strings RepoText: Remove unused externalized string CLI: Remove unused externalized strings Change-Id: Iaea77a89fcd821df5dbb24f5e3e39e6d1dfc0bd4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Format BUILD files with buildifierMatthias Sohn2019-09-081-1/+1
| | | | | | | | | | | | | | | | Using buildifier from master branch and the command: $ buildifier -r -lint fix -warnings all . Change-Id: I52a18c09a1f192e2141f4156f9c1aabbbdbc910a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'stable-5.2' into stable-5.3Matthias Sohn2019-09-081-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.2: [error prone] Suppress NonAtomicVolatileUpdate in SimpleLruCache Bazel: Format BUILD files with buildifier Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Bazel: Fix warning about deprecated lib.bzl Format lib/BUILD with buildifier Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Bazel: Bump minimum supported version to 0.29.0 Bazel: Bump skylib library version to 0.8.0 Use bazelisk to switch between used bazel version Bazel: Require minimum bazel version 0.17.1 Fix wrong placeholder index in error message packInaccessible JGitText: Remove unused externalized strings RepoText: Remove unused externalized string CLI: Remove unused externalized strings Change-Id: I0d8b7f79177a20dc00c89e2cf0005eb3d3039532 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Bazel: Add fixes for --incompatible_load_java_rules_from_bzlDavid Pursehouse2019-09-081-0/+1
| | | | | | | | | | | | | | | Change-Id: Ifc47ae22209fdb7a5d7bede4da002640ed26a43a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Increase severity of AmbiguousMethodReference to ERRORDavid Pursehouse2019-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | All instances of this problem have been fixed. Increase its severity to ERROR to prevent reoccurrences. Change-Id: I42d41a7c32b43d1ba59a28cd2f5a7d0ad315d8d9 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Fix NarrowingCompoundAssignment warnings from Error ProneDavid Pursehouse2019-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error Prone reports: [NarrowingCompoundAssignment] Compound assignments from long to int hide lossy casts and [NarrowingCompoundAssignment] Compound assignments from int to byte hide lossy casts See https://errorprone.info/bugpattern/NarrowingCompoundAssignment Fix the warnings by adding explicit casts or changing types as necessary. Now that all occurrences of the warning are fixed, increase its severity to ERROR. Change-Id: Idb3670e6047b146ae37daee07212ff9455512623 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | GlobalBundleCache: Fix ClassNewInstance warning from Error ProneDavid Pursehouse2019-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error Prone reports: [ClassNewInstance] Class.newInstance() bypasses exception checking; prefer getDeclaredConstructor().newInstance() See https://errorprone.info/bugpattern/ClassNewInstance This was the only occurrence of the warning in the code base; now it's fixed, increase the severity to ERROR to prevent future occurrences. Change-Id: Ic04d1c5d2bd458bbb4bb399d6ce9d147bd48d0b1 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Error Prone: Increase severity of NonOverridingEquals to ERRORDavid Pursehouse2019-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error Prone reports the warning on several classes: [NonOverridingEquals] equals method doesn't override Object.equals; if this is a type-specific helper for a method that does override Object.equals, either inline it into the callers or rename it to avoid ambiguity. See https://errorprone.info/bugpattern/NonOverridingEquals Most of these are in the public API, so we can't rename or inline them without breaking the API. FileSnapshot is not part of the public API, but clients may be using it anyway, so we also shouldn't change that. Suppress all the warnings instead. Having the check at severity ERROR will at least make sure we don't introduce any new occurrences. Change-Id: I92345c11256f06b4fa03ccc13337f72af5a43591 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Error Prone: Increase severity of ImmutableEnumChecker to ERRORDavid Pursehouse2019-06-171-1/+1
| | | | | | | | | | | | | | | Change-Id: I846b6d99867767409536e7c9bd0cbd11d9236074 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Error Prone: Increase severity of ShortCircuitBoolean to ERRORDavid Pursehouse2019-06-151-1/+1
| | | | | | | | | | | | | | | Change-Id: Ib3f1b8b37160e2bd715dfc81a845e4c6fcfea2c5 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Increase severity of OperatorPrecedence to ERROR, and fix instancesDavid Pursehouse2019-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix all remaining instances of the OperatorPrededence warning, by adding parentheses to make the precedence explicit. Change-Id: Ib296dfed09f9be042d0ff0f7fad8214e4dd766b4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Merge branch 'master' into stable-5.4Matthias Sohn2019-06-111-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Handle missing "ours" stage in WorkingTreeIterator.hasCrLfInIndex() Config: Add helper method to check for empty value ErrorProne: Increase severity of FutureReturnValueIgnored to ERROR FS_Win32: Add missing parentheses on if-blocks Upgrade spotbugs to 3.1.12 Abbreviated{Long}ObjectId: Make operator precedence explicit GC: Update TODO comments FS_POSIX: Fix reference comparison of Boolean.FALSE Increase bazel timeout for long running tests Use bazelisk to switch between used bazel version Bump minimum Bazel version to 0.26.1 Bazel: Bump skylib library version to 0.8.0 Retry loading config when locked by another process Make pull --rebase on an unborn branch do a checkout Warn if configured cookie file is missing Handle escaped CR-LF in git config files DescribeCommand: use glob match instead of path match Fix off-by-one error in RebaseTodoFile when reading a todo file Consistently use "!isEmpty()" to detect non-empty list TransportHttp: Check for non-empty list with "!isEmpty()" rather than "size() > 0" TransportHttp: Fix comparison of size with ">= 0" NetscapeCookieFileTest: Split HttpCookiesMatcher to own class Bazel: Add missing dependency on mockito for TransportHttpTest Determine hard-linking and nlink support per FileStore Support reading and writing cookies. Repository: Add getIdentifier() method to avoid instanceof operator Update to Orbit R20190602212107 PacketLineIn: Deprecate the END constant PacketLineIn: Add an iterator over strings in the input stream Replace most usages of PacketLineIn.END with PacketLineIn.end() PacketLineIn: Deprecate DELIM constant Replace trivial reference comparison of PacketLineIn.{DELIM,END} PacketLineIn: Rename isDelim to isDelimiter ProtocolV2ParserTest: Fix typo in comment Upgrade Bouncy Castle to 1.61 Update to Orbit R20190531194818 and rollback update to Ant 1.10.6 cli: Add the --always option to describe DescribeCommand: Support the "always" option cli: Add the --tags option to describe DescribeCommand: Consistenly omit the default value Remove excess blank line in FileUtilsTest PacketLineIn: Add helper methods to check for END and DELIM UploadPackTest: Rename variable to avoid hiding class member UploadPackTest: Add missing <> operator on instantiation of ArrayList BitmapCalculator: javadoc fixes RevWalkUtils: add progress callback to findBranchesReachableFrom Upgrade maven-source-plugin to 3.1.0 Upgrade maven-jar-plugin to 3.1.2 Upgrade jacoco-maven-plugin to 0.8.4 BitmapCalculator and its test: add missing license header RevWalk: new method createReachabilityChecker() Change-Id: I4d76c7c0dbe6411c842f3468b709f7df51789c08 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | ErrorProne: Increase severity of FutureReturnValueIgnored to ERRORDavid Pursehouse2019-06-111-1/+1
| |/ | | | | | | | | | | | | | | The only remaining code where the return value is ignored is in tests. Update them to store the value and perform a basic assertion. Change-Id: I29ef5bd5dd0648aac3490f9e47ecc74544109652 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Bazel: Increase severity of most error-prone checks to ERRORDavid Pursehouse2019-05-261-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the checks can be increased to ERROR because there is no code in the project that triggers them. There are still several that are triggered, and these are left at the WARN severity: https://errorprone.info/bugpattern/AmbiguousMethodReference https://errorprone.info/bugpattern/BadComparable https://errorprone.info/bugpattern/ClassNewInstance https://errorprone.info/bugpattern/Finally https://errorprone.info/bugpattern/FutureReturnValueIgnored https://errorprone.info/bugpattern/ImmutableEnumChecker https://errorprone.info/bugpattern/NarrowingCompoundAssignment https://errorprone.info/bugpattern/NonOverridingEquals https://errorprone.info/bugpattern/OperatorPrecedence https://errorprone.info/bugpattern/ReferenceEquality https://errorprone.info/bugpattern/ShortCircuitBoolean https://errorprone.info/bugpattern/StringEquality https://errorprone.info/bugpattern/TypeParameterUnusedInFormals These can be cleaned up and increased to ERROR in follow-up commits. Change-Id: Icfc3b3163e129e504f10b3fc856aef262f723f99 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Enable error-prone checks by defaultDavid Pursehouse2019-05-261-1/+3
|/ | | | | | | | | | | | | | Based on recent work by Dave Borowitz on the Gerrit project [1, 2]. The warnings/error configuration is unchanged, but now the checks are enabled by default during the build rather than having to be manually invoked. [1] https://gerrit-review.googlesource.com/c/gerrit/+/225653 [2] https://gerrit-review.googlesource.com/c/gerrit/+/225714 Change-Id: I7f4849896af72de38880b13d64519cc93bb3d2a3 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Bazel: Increase severity of ClassCanBeStatic to ERRORDavid Pursehouse2018-11-081-1/+1
| | | | | Change-Id: I8250fd15cfff6bbba54a238be31b3cf772edab3f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Bazel: Format tools/BUILD with buildifierDavid Pursehouse2018-11-061-6/+6
| | | | | Change-Id: I292613a0e40d2022bc68c6acbd45d37a54c1e613 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Upgrade to Bazel 0.19.0David Ostrovsky2018-11-011-1/+1
| | | | | | | | | Also replace native git_repository rule with Starlark rule. This is needed because in recent Bazel versions native git_repository rule is deprecated. Change-Id: I2c19fd31693a930d7d35fdbb93bfa4abf21fa2aa Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* Bazel: Increase severity of DefaultCharset to ERRORDavid Pursehouse2018-09-301-1/+1
| | | | | | | | | All existing instances of this issue have been fixed in preceding commits. Increase its severity to ERROR so that it is easier to detect reoccurences. Change-Id: I50f95152857baac5ca44c15493f23b6f9cfac1bf Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Bazel: Increase severity of MissingFail to ERRORDavid Pursehouse2018-09-301-1/+1
| | | | | | | | | All instances of this potential bug have been cleaned up in preceding commits. Increase the severity to ERROR so that it is easier to detect reoccurences. Change-Id: I25beebcea1f01f468e0f2b1d24a83511029c077c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Bazel: Increase severity of ExpectedExceptionChecker to ERRORDavid Pursehouse2018-09-261-1/+1
| | | | | | | | | Incorrect usage of ExpectedException has been cleaned up in the preceding commits. Increase the severity from WARN to ERROR so that it is easier to catch any reoccurences. Change-Id: I57decf620b37e85413bda53723f839c02b488f2c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Bazel: Provide toolchain with activated error prone warningsDavid Ostrovsky2018-09-221-0/+107
| | | | | | | | | | | | | | | | | | On recent bazel versions it's trivial to apply package specific checks. Provide custom java toolchain with all error prone warnings activated. The list of all error prone warnings was borrowed from here: [1]. Test Plan: $ bazel build --java_toolchain //tools:error_prone_warnings_toolchain \ //... [1] https://github.com/bazelbuild/BUILD_file_generator/blob/master/tools/bazel_defs/java.bzl Change-Id: I207a368555bfb7ddab8d782d46d563ce779a6211 Signed-off-by: David Ostrovsky <david@ostrovsky.org> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Implement initial framework of Bazel buildDavid Ostrovsky2017-01-181-0/+0
The initial implementation only builds the packages consumed by Gerrit Code Review. Test build and execution is not implemented. We prefer to consume maven_jar custom rule from bazlets repository, for the same reasons as in the Gerrit project: * Caching artifacts across different clones and projects * Exposing source classifiers and neverlink artifact TEST PLAN: $ bazel build :all $ unzip -t bazel-genfiles/all.zip Archive: bazel-genfiles/all.zip testing: libjgit-archive.jar OK testing: libjgit-servlet.jar OK testing: libjgit.jar OK testing: libjunit.jar OK No errors detected in compressed data of bazel-genfiles/all.zip. Change-Id: Ia837ce95d9829fe2515f37b7a04a71a4598672a0 Signed-off-by: David Ostrovsky <david@ostrovsky.org> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>