From bf349b2769792db84be5c565df38d0de500ee512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20Gu=CC=88ndu=CC=88z?= Date: Sat, 7 Mar 2020 22:08:59 +0100 Subject: [PATCH] Basic project structure setup with root files --- CHANGELOG.md | 32 +++++++++ LICENSE | 21 ++++++ Package.resolved | 16 +++++ Package.swift | 27 +++---- README.md | 78 ++++++++++++++++++++- Sources/AnyLint/AnyLint.swift | 6 +- Sources/AnyLintCLI/AnyLintCLI.swift | 3 + Tests/AnyLintCLITests/AnyLintCLITests.swift | 8 +++ Tests/AnyLintTests/AnyLintTests.swift | 9 +-- Tests/AnyLintTests/XCTestManifests.swift | 9 --- Tests/LinuxMain.swift | 7 -- 11 files changed, 176 insertions(+), 40 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 LICENSE create mode 100644 Package.resolved create mode 100644 Sources/AnyLintCLI/AnyLintCLI.swift create mode 100644 Tests/AnyLintCLITests/AnyLintCLITests.swift delete mode 100644 Tests/AnyLintTests/XCTestManifests.swift delete mode 100644 Tests/LinuxMain.swift diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..ab46810 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,32 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). + +
+Formatting Rules for Entries +Each entry should use the following format: + +```markdown +- Summary of what was changed in a single line using past tense & followed by two whitespaces. + Issue: [#0](https://github.com/Flinesoft/AnyLint/issues/0) | PR: [#0](https://github.com/Flinesoft/AnyLint/pull/0) | Author: [Cihat Gündüz](https://github.com/Jeehut) +``` + +Note that at the end of the summary line, you need to add two whitespaces (` `) for correct rendering on GitHub. + +If needed, pluralize to `Tasks`, `PRs` or `Authors` and list multiple entries separated by `, `. Also, remove entries not needed in the second line. +
+ +## [Unreleased] +### Added +- None. +### Changed +- None. +### Deprecated +- None. +### Removed +- None. +### Fixed +- None. +### Security +- None. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b1efe33 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Flinesoft (alias Cihat Gündüz) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..16f18a7 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,16 @@ +{ + "object": { + "pins": [ + { + "package": "HandySwift", + "repositoryURL": "https://github.com/Flinesoft/HandySwift.git", + "state": { + "branch": null, + "revision": "083707d9f9da65bd57b756294653ee0fc50d8662", + "version": "3.1.0" + } + } + ] + }, + "version": 1 +} diff --git a/Package.swift b/Package.swift index f3df8ca..ca1d951 100644 --- a/Package.swift +++ b/Package.swift @@ -1,28 +1,31 @@ // swift-tools-version:5.1 -// The swift-tools-version declares the minimum version of Swift required to build this package. - import PackageDescription let package = Package( name: "AnyLint", products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "AnyLint", - targets: ["AnyLint"]), + .library(name: "AnyLint", targets: ["AnyLint"]), + .executable(name: "anylint", targets: ["AnyLintCLI"]), ], dependencies: [ - // Dependencies declare other packages that this package depends on. - // .package(url: /* package url */, from: "1.0.0"), + .package(url: "https://github.com/Flinesoft/HandySwift.git", from: "3.1.0"), ], targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. .target( name: "AnyLint", - dependencies: []), + dependencies: ["HandySwift"] + ), .testTarget( name: "AnyLintTests", - dependencies: ["AnyLint"]), + dependencies: ["AnyLint"] + ), + .target( + name: "AnyLintCLI", + dependencies: ["HandySwift"] + ), + .testTarget( + name: "AnyLintCLITests", + dependencies: ["AnyLintCLI"] + ), ] ) diff --git a/README.md b/README.md index 71f570d..fd5e0a1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,79 @@ # AnyLint -A description of this package. +Lint anything by combining the power of Swift & regular expressions. + +

+ + Build Status + + + Code Quality + + + Coverage + + + Version: 0.0.0 + + + License: MIT + +
+ + PayPal: Donate + + + GitHub: Become a sponsor + + + Patreon: Become a patron + +

+ +

+ Installation + • Configuration + • Usage + • Donation + • Issues + • Contributing + • License +

+ +# AnyLint + +This is the FitnessTracker app project for the Android platform. + +## Installation + +TODO + +## Configuration + +TODO + +## Usage + +TODO + +## Donation + +AnyLint was brought to you by [Cihat Gündüz](https://github.com/Jeehut) in his free time. If you want to thank me and support the development of this project, please **make a small donation on [PayPal](https://paypal.me/Dschee/5EUR)**. In case you also like my other [open source contributions](https://github.com/Flinesoft) and [articles](https://medium.com/@Jeehut), please consider motivating me by **becoming a sponsor on [GitHub](https://github.com/sponsors/Jeehut)** or a **patron on [Patreon](https://www.patreon.com/Jeehut)**. + +Thank you very much for any donation, it really helps out a lot! 💯 + +## Contributing + +Contributions are welcome. Feel free to open an issue on GitHub with your ideas or implement an idea yourself and post a pull request. If you want to contribute code, please try to follow the same syntax and semantic in your **commit messages** (see rationale [here](http://chris.beams.io/posts/git-commit/)). Also, please make sure to add an entry to the `CHANGELOG.md` file which explains your change. + +## License + +This library is released under the [MIT License](http://opensource.org/licenses/MIT). See LICENSE for details. diff --git a/Sources/AnyLint/AnyLint.swift b/Sources/AnyLint/AnyLint.swift index 78f37fa..934117e 100644 --- a/Sources/AnyLint/AnyLint.swift +++ b/Sources/AnyLint/AnyLint.swift @@ -1,3 +1,3 @@ -struct AnyLint { - var text = "Hello, World!" -} +import Foundation + +// TODO: [2020-03-07] not yet implemented diff --git a/Sources/AnyLintCLI/AnyLintCLI.swift b/Sources/AnyLintCLI/AnyLintCLI.swift new file mode 100644 index 0000000..934117e --- /dev/null +++ b/Sources/AnyLintCLI/AnyLintCLI.swift @@ -0,0 +1,3 @@ +import Foundation + +// TODO: [2020-03-07] not yet implemented diff --git a/Tests/AnyLintCLITests/AnyLintCLITests.swift b/Tests/AnyLintCLITests/AnyLintCLITests.swift new file mode 100644 index 0000000..f8318d1 --- /dev/null +++ b/Tests/AnyLintCLITests/AnyLintCLITests.swift @@ -0,0 +1,8 @@ +import XCTest +@testable import AnyLintCLI + +final class AnyLintCLITests: XCTestCase { + func testExample() { + // TODO: [2020-03-07] not yet implemented + } +} diff --git a/Tests/AnyLintTests/AnyLintTests.swift b/Tests/AnyLintTests/AnyLintTests.swift index 5b13bbb..4ea10b5 100644 --- a/Tests/AnyLintTests/AnyLintTests.swift +++ b/Tests/AnyLintTests/AnyLintTests.swift @@ -3,13 +3,6 @@ import XCTest final class AnyLintTests: XCTestCase { func testExample() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct - // results. - XCTAssertEqual(AnyLint().text, "Hello, World!") + // TODO: [2020-03-07] not yet implemented } - - static var allTests = [ - ("testExample", testExample), - ] } diff --git a/Tests/AnyLintTests/XCTestManifests.swift b/Tests/AnyLintTests/XCTestManifests.swift deleted file mode 100644 index 8ebc876..0000000 --- a/Tests/AnyLintTests/XCTestManifests.swift +++ /dev/null @@ -1,9 +0,0 @@ -import XCTest - -#if !canImport(ObjectiveC) -public func allTests() -> [XCTestCaseEntry] { - return [ - testCase(AnyLintTests.allTests), - ] -} -#endif diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift deleted file mode 100644 index 880dd06..0000000 --- a/Tests/LinuxMain.swift +++ /dev/null @@ -1,7 +0,0 @@ -import XCTest - -import AnyLintTests - -var tests = [XCTestCaseEntry]() -tests += AnyLintTests.allTests() -XCTMain(tests)