-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from hmrc/ADR-749
ADR-749 Prepare for development
- Loading branch information
Showing
14 changed files
with
330 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
version = 2.7.1 | ||
maxColumn = 120 | ||
lineEndings = unix | ||
importSelectors = singleLine | ||
|
||
project { | ||
git = true | ||
} | ||
|
||
align { | ||
preset = most | ||
tokens = [ {code = "=>", owner = "Case|Type.Arg.ByName"}, "=", "<-", "->", "%", "%%", "should", "shouldBe", "shouldEqual", "shouldNot", "must" ] | ||
arrowEnumeratorGenerator = true | ||
openParenCallSite = false | ||
openParenDefnSite = false | ||
} | ||
|
||
binPack { | ||
parentConstructors = false | ||
} | ||
|
||
continuationIndent { | ||
callSite = 2 | ||
defnSite = 2 | ||
} | ||
|
||
newlines { | ||
penalizeSingleSelectMultiArgList = false | ||
sometimesBeforeColonInMethodReturnType = true | ||
} | ||
|
||
rewrite { | ||
rules = [RedundantBraces, RedundantParens, AsciiSortImports] | ||
redundantBraces { | ||
maxLines = 100 | ||
includeUnitMethods = true | ||
stringInterpolation = true | ||
} | ||
} | ||
|
||
spaces { | ||
inImportCurlyBraces = false | ||
beforeContextBoundColon = Never | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,43 @@ | ||
|
||
# alcohol-duty-returns | ||
|
||
This is a placeholder README.md for a new repository | ||
This is the backend microservice that handles Returns related operations for Alcohol Duty Service. | ||
|
||
## API Endpoints | ||
|
||
## Running the service | ||
|
||
> `sbt run` | ||
The service runs on port `16001` by default. | ||
|
||
## Running tests | ||
|
||
### Unit tests | ||
|
||
> `sbt test` | ||
### Integration tests | ||
|
||
> `sbt it:test` | ||
## Scalafmt and Scalastyle | ||
|
||
To check if all the scala files in the project are formatted correctly: | ||
> `sbt scalafmtCheckAll` | ||
To format all the scala files in the project correctly: | ||
> `sbt scalafmtAll` | ||
To check if there are any scalastyle errors, warnings or infos: | ||
> `sbt scalastyle` | ||
> | ||
> ### All tests and checks | ||
This is an sbt command alias specific to this project. It will run a scala format | ||
check, run a scala style check, run unit tests, run integration tests and produce a coverage report: | ||
> `sbt runAllChecks` | ||
### License | ||
|
||
This code is open source software licensed under the [Apache 2.0 License]("http://www.apache.org/licenses/LICENSE-2.0.html"). | ||
This code is open source software licensed under | ||
the [Apache 2.0 License]("http://www.apache.org/licenses/LICENSE-2.0.html"). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
/* | ||
* Copyright 2023 HM Revenue & Customs | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package uk.gov.hmrc.alcoholdutyreturns.config | ||
|
||
import javax.inject.{Inject, Singleton} | ||
import play.api.Configuration | ||
|
||
@Singleton | ||
class AppConfig @Inject()(config: Configuration) { | ||
class AppConfig @Inject() (config: Configuration) { | ||
|
||
val appName: String = config.get[String]("appName") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
/* | ||
* Copyright 2023 HM Revenue & Customs | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package uk.gov.hmrc.alcoholdutyreturns.config | ||
|
||
import com.google.inject.AbstractModule | ||
|
||
class Module extends AbstractModule { | ||
|
||
override def configure(): Unit = { | ||
|
||
override def configure(): Unit = | ||
bind(classOf[AppConfig]).asEagerSingleton() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
resolvers += MavenRepository("HMRC-open-artefacts-maven2", "https://open.artefacts.tax.service.gov.uk/maven2") | ||
resolvers += Resolver.url("HMRC-open-artefacts-ivy2", url("https://open.artefacts.tax.service.gov.uk/ivy2"))(Resolver.ivyStylePatterns) | ||
resolvers += Resolver.url("HMRC-open-artefacts-ivy2", url("https://open.artefacts.tax.service.gov.uk/ivy2"))( | ||
Resolver.ivyStylePatterns | ||
) | ||
resolvers += Resolver.typesafeRepo("releases") | ||
|
||
addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.14.0") | ||
addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.2.0") | ||
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.20") | ||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") | ||
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
repoVisibility: public_0C3F0CE3E6E6448FAD341E7BFA50FCD333E06A20CFF05FCACE61154DDBBADF71 | ||
type: service | ||
service-type: backend | ||
tags: [] | ||
tags: [ ] |
Oops, something went wrong.