Skip to content

Commit

Permalink
lint: fix solhint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
xenide committed Jun 6, 2024
1 parent e44cb27 commit e72bb07
Show file tree
Hide file tree
Showing 8 changed files with 984 additions and 1,805 deletions.
2,771 changes: 974 additions & 1,797 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@proxima-oss/eslint-config": "6.0.1",
"markdownlint-cli": "0.31.1",
"prettier": "2.6.2",
"ts-node": "10.8.1",
"solhint": "3.3.8"
"solhint": "5.0.1",
"ts-node": "10.8.1"
}
}
4 changes: 3 additions & 1 deletion src/ReservoirPriceOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ contract ReservoirPriceOracle is IPriceOracle, IReservoirPriceOracle, Owned(msg.

if (lPayoutAmt <= address(this).balance) {
payable(aRecipient).transfer(lPayoutAmt);
} else { } // do nothing if lPayoutAmt is greater than the balance
}
// do nothing if lPayoutAmt is greater than the balance
}

/// @return rRoute The route to determine the price between aToken0 and aToken1
Expand Down Expand Up @@ -306,6 +307,7 @@ contract ReservoirPriceOracle is IPriceOracle, IReservoirPriceOracle, Owned(msg.
}
}
// no route
// solhint-disable-next-line no-empty-blocks
else if (lFirstWord.isUninitialized()) { }

rRoute = new address[](lRouteLength);
Expand Down
1 change: 0 additions & 1 deletion src/interfaces/IReservoirPriceOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
pragma solidity ^0.8.0;

import { OracleAverageQuery, OracleLatestQuery, OracleAccumulatorQuery } from "src/Structs.sol";
import { Variable } from "src/Enums.sol";

/**
* @dev Interface for querying historical data from a Pool that can be used as a Price Oracle.
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/QueryProcessor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { LogCompression } from "amm-core/libraries/LogCompression.sol";
import { Buffer } from "amm-core/libraries/Buffer.sol";
import { ReservoirPair, Observation } from "amm-core/ReservoirPair.sol";

import { Variable, OracleAverageQuery, OracleAccumulatorQuery } from "src/interfaces/IReservoirPriceOracle.sol";
import { Variable } from "src/interfaces/IReservoirPriceOracle.sol";
import { OracleErrors } from "src/libraries/OracleErrors.sol";
import { Samples } from "src/libraries/Samples.sol";

Expand Down
2 changes: 0 additions & 2 deletions src/libraries/Utils.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;

import { OracleErrors } from "src/libraries/OracleErrors.sol";

library Utils {
/// @dev Square of 1e18 (WAD)
uint256 internal constant WAD_SQUARED = 1e36;
Expand Down
4 changes: 3 additions & 1 deletion test/.solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"not-rely-on-time": "off",
"func-name-mixedcase": "off",
"var-name-mixedcase": "off",
"no-inline-assembly": "off"
"no-inline-assembly": "off",
"gas-custom-errors": "off",
"no-unused-import": "off"
}
}
1 change: 1 addition & 0 deletions test/unit/ReservoirPriceOracle.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ contract ReservoirPriceOracleTest is BaseTest {
_addressSet.add(address(_tokenD));
}

// solhint-disable-next-line no-empty-blocks
receive() external payable { } // required to receive reward payout from priceCache

function setUp() external {
Expand Down

0 comments on commit e72bb07

Please sign in to comment.