Documentation: coding style setting with examples (#471)
This commit is contained in:
Родитель
aed6eb6a9b
Коммит
38bd40019e
27
README.md
27
README.md
|
@ -28,16 +28,17 @@ This repository contains symbolic links which don't work properly on Windows. To
|
|||
```sh
|
||||
$ git config --local include.path ../dev/.gitconfig
|
||||
$ git replace-symlinks # replace symlinks with junctions
|
||||
$ git restore-symlinks # restore symlinks
|
||||
$ #git restore-symlinks # use this to restore symlinks if you need
|
||||
```
|
||||
|
||||
### Using IntelliJ
|
||||
|
||||
You can use the built-in sbt shell in IntelliJ without any problems. However, the built-in "Build Project" command may not work. To fix the issue, go to Project Structure -> Project Settings -> Modules and follow these steps:
|
||||
|
||||
- Mark `src/main/scala` and `src/main/scala-spark2` as "Sources" and `src/test/scala` and `src/test/scala-spark2` as "Tests" for the `spark2_4` module
|
||||
- Mark `src/main/scala` and `src/main/scala-spark3` as "Sources" and `src/test/scala` and `src/test/scala-spark3` as "Tests" for the `spark3_0` module
|
||||
- Remove the `root` and `hyperspace-sources` modules
|
||||
- Mark `src/main/scala` and `src/main/scala-spark2` as "Sources" and `src/test/scala` and `src/test/scala-spark2` as "Tests" for the `spark2_4` module.
|
||||
- Mark `src/main/scala` and `src/main/scala-spark3` as "Sources" and `src/test/scala` and `src/test/scala-spark3` as "Tests" for the `spark3_0` module.
|
||||
- Remove the `root` and `hyperspace-sources` modules.
|
||||
- An example of [Project Structure](./docs/assets/images/project_structure.png)
|
||||
|
||||
Additionally, you might have to run `sbt buildInfo` if you encounter an error like `object BuildInfo is not a member of package com.microsoft.hyperspace` for the first build.
|
||||
|
||||
|
@ -45,18 +46,18 @@ Additionally, you might have to run `sbt buildInfo` if you encounter an error li
|
|||
|
||||
This project would not have been possible without the outstanding work from the following communities:
|
||||
|
||||
- [Apache Spark](https://spark.apache.org/): Unified Analytics Engine for Big Data, the engine that
|
||||
- [Apache Spark](https://spark.apache.org/): Unified Analytics Engine for Big Data, the engine that
|
||||
Hyperspace builds on top of.
|
||||
- [Delta Lake](https://delta.io): Delta Lake is an open-source storage layer that brings ACID
|
||||
transactions to Apache Spark™ and big data workloads. Hyperspace derives quite a bit of inspiration
|
||||
from the way the Delta Lake community operates and pioneering of some surrounding ideas in the
|
||||
context of data lakes (e.g., their novel use of optimistic concurrency).
|
||||
- [Databricks](https://databricks.com/): Unified analytics platform. Many thanks to all the inspiration
|
||||
- [Delta Lake](https://delta.io): Delta Lake is an open-source storage layer that brings ACID
|
||||
transactions to Apache Spark™ and big data workloads. Hyperspace derives quite a bit of inspiration
|
||||
from the way the Delta Lake community operates and pioneering of some surrounding ideas in the
|
||||
context of data lakes (e.g., their novel use of optimistic concurrency).
|
||||
- [Databricks](https://databricks.com/): Unified analytics platform. Many thanks to all the inspiration
|
||||
they have provided us.
|
||||
- [.NET for Apache Spark™](https://github.com/dotnet/spark): Hyperspace offers .NET bindings for
|
||||
- [.NET for Apache Spark™](https://github.com/dotnet/spark): Hyperspace offers .NET bindings for
|
||||
developers, thanks to the efforts of this team in collaborating and releasing the bindings just-in-time.
|
||||
- [Minimal Mistakes](https://github.com/mmistakes/minimal-mistakes): The awesome theme behind
|
||||
Hyperspace documentation.
|
||||
- [Minimal Mistakes](https://github.com/mmistakes/minimal-mistakes): The awesome theme behind
|
||||
Hyperspace documentation.
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 53 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 72 KiB |
|
@ -8,6 +8,13 @@ Scala Coding Style
|
|||
> Note: Databricks Style Guide will be preferred for conflict resolutions.
|
||||
|
||||
* For formatting, [scalafmt](https://scalameta.org/scalafmt) is used with the custom configuration (found in [/dev/.scalafmt.conf](/dev/.scalafmt.conf))
|
||||
* Installation of `scalafmt` can be found [here](https://scalameta.org/scalafmt/docs/installation.html)
|
||||
* Set scalafmt as the formatter
|
||||
* Open Preferences (Settings if you use Windows) > Editor > Code Style > Scala
|
||||
* Select Scalafmt as the formatter
|
||||
* Check 'Reformat on file save'
|
||||
* Select `./dev/.scalafmt.conf` for Configuration
|
||||
![Setting](../assets/images/scalafmt_settings.png)
|
||||
* Detailed installation of `scalafmt` can be found [here](https://scalameta.org/scalafmt/docs/installation.html)
|
||||
|
||||
|
||||
* There is also a Scala style check using [scalastyle-config.xml](/scalastyle-config.xml), which is run automatically when you compile your project using `sbt`.
|
||||
|
|
Загрузка…
Ссылка в новой задаче