diff --git a/README.md b/README.md index d709f16d..8923fd39 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,23 @@ # income-tax-self-employment -This is a placeholder README.md for a new repository +This is where we make API calls from users viewing and making changes to the Self-Employment section of their income tax return. + +## Running the service locally + +You will need to have the following: +- Installed/configured [service manager](https://github.com/hmrc/service-manager). + +The service manager profile for this service is: + + sm --start INCOME_TAX_SELF_EMPLOYMENT +Run the following command to start the remaining services locally: + + sudo mongod (If not already running) + sm --start INCOME_TAX_SUBMISSION_ALL -r + +This service runs on port: `localhost:10900` + ### License diff --git a/app/uk/gov/hmrc/incometaxselfemployment/config/AppConfig.scala b/app/uk/gov/hmrc/incometaxselfemployment/config/AppConfig.scala index b5f9125b..d172dbd9 100755 --- a/app/uk/gov/hmrc/incometaxselfemployment/config/AppConfig.scala +++ b/app/uk/gov/hmrc/incometaxselfemployment/config/AppConfig.scala @@ -1,3 +1,19 @@ +/* + * 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.incometaxselfemployment.config import javax.inject.{Inject, Singleton} diff --git a/app/uk/gov/hmrc/incometaxselfemployment/config/Module.scala b/app/uk/gov/hmrc/incometaxselfemployment/config/Module.scala index d73a90e4..e4f38f3a 100755 --- a/app/uk/gov/hmrc/incometaxselfemployment/config/Module.scala +++ b/app/uk/gov/hmrc/incometaxselfemployment/config/Module.scala @@ -1,3 +1,19 @@ +/* + * 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.incometaxselfemployment.config import com.google.inject.AbstractModule diff --git a/app/uk/gov/hmrc/incometaxselfemployment/controllers/MicroserviceHelloWorldController.scala b/app/uk/gov/hmrc/incometaxselfemployment/controllers/MicroserviceHelloWorldController.scala index b7ba938b..a318d3e5 100755 --- a/app/uk/gov/hmrc/incometaxselfemployment/controllers/MicroserviceHelloWorldController.scala +++ b/app/uk/gov/hmrc/incometaxselfemployment/controllers/MicroserviceHelloWorldController.scala @@ -1,3 +1,19 @@ +/* + * 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.incometaxselfemployment.controllers import uk.gov.hmrc.play.bootstrap.backend.controller.BackendController diff --git a/build.sbt b/build.sbt index 03e22e43..6fa850b2 100755 --- a/build.sbt +++ b/build.sbt @@ -1,3 +1,18 @@ +/* + * 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. + */ import uk.gov.hmrc.DefaultBuildSettings.integrationTestSettings lazy val microservice = Project("income-tax-self-employment", file(".")) diff --git a/check.sh b/check.sh new file mode 100755 index 00000000..c2bfa944 --- /dev/null +++ b/check.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +sbt clean scalastyle coverage test it:test coverageReport diff --git a/conf/application.conf b/conf/application.conf index 0b4b1454..d10447d9 100755 --- a/conf/application.conf +++ b/conf/application.conf @@ -1,3 +1,16 @@ +# 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. include "backend.conf" diff --git a/it/uk/gov/hmrc/incometaxselfemployment/HealthEndpointIntegrationSpec.scala b/it/uk/gov/hmrc/incometaxselfemployment/HealthEndpointIntegrationSpec.scala index 11da7d75..562347da 100755 --- a/it/uk/gov/hmrc/incometaxselfemployment/HealthEndpointIntegrationSpec.scala +++ b/it/uk/gov/hmrc/incometaxselfemployment/HealthEndpointIntegrationSpec.scala @@ -1,3 +1,19 @@ +/* + * 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.incometaxselfemployment import org.scalatest.concurrent.{IntegrationPatience, ScalaFutures} diff --git a/project/AppDependencies.scala b/project/AppDependencies.scala index a32d1f94..049cac43 100755 --- a/project/AppDependencies.scala +++ b/project/AppDependencies.scala @@ -1,7 +1,20 @@ -import play.core.PlayVersion -import play.sbt.PlayImport._ -import sbt.Keys.libraryDependencies -import sbt._ +/* + * 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. + */ +import play.core.PlayVersion.current +import sbt.* object AppDependencies { diff --git a/project/CodeCoverageSettings.scala b/project/CodeCoverageSettings.scala index 28ba361e..6030033e 100755 --- a/project/CodeCoverageSettings.scala +++ b/project/CodeCoverageSettings.scala @@ -1,3 +1,18 @@ +/* + * 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. + */ import sbt.Setting import scoverage.ScoverageKeys diff --git a/project/plugins.sbt b/project/plugins.sbt index ef3f1f56..89fadba6 100755 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,18 @@ +/* + * 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. + */ 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.typesafeRepo("releases") @@ -6,3 +21,4 @@ addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.9.0") addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.2.0") addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.19") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") +addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") diff --git a/run.sh b/run.sh new file mode 100755 index 00000000..0b36acf1 --- /dev/null +++ b/run.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +sbt run diff --git a/scalastyle-config.xml b/scalastyle-config.xml new file mode 100644 index 00000000..ba6b71ac --- /dev/null +++ b/scalastyle-config.xml @@ -0,0 +1,117 @@ + + Scalastyle standard configuration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/uk/gov/hmrc/incometaxselfemployment/controllers/MicroserviceHelloWorldControllerSpec.scala b/test/uk/gov/hmrc/incometaxselfemployment/controllers/MicroserviceHelloWorldControllerSpec.scala index aa394c10..749cf838 100755 --- a/test/uk/gov/hmrc/incometaxselfemployment/controllers/MicroserviceHelloWorldControllerSpec.scala +++ b/test/uk/gov/hmrc/incometaxselfemployment/controllers/MicroserviceHelloWorldControllerSpec.scala @@ -1,3 +1,19 @@ +/* + * 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.incometaxselfemployment.controllers import org.scalatest.matchers.should.Matchers