From 182d9fd96057b8f372620b81debd026177b20970 Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Wed, 8 Apr 2020 21:31:11 -0700 Subject: [PATCH] Move project_defaults dir to proper template repo --- other_project_defaults/LICENSE => LICENSE | 0 README.md | 4 + .../IDETemplateMacros.plist | 19 ---- other_project_defaults/README.md | 47 -------- other_project_defaults/build_docs.sh | 32 ------ other_project_defaults/lint.sh | 37 ------ other_project_defaults/swiftlint.yml | 107 ------------------ 7 files changed, 4 insertions(+), 242 deletions(-) rename other_project_defaults/LICENSE => LICENSE (100%) delete mode 100644 other_project_defaults/IDETemplateMacros.plist delete mode 100644 other_project_defaults/README.md delete mode 100755 other_project_defaults/build_docs.sh delete mode 100755 other_project_defaults/lint.sh delete mode 100644 other_project_defaults/swiftlint.yml diff --git a/other_project_defaults/LICENSE b/LICENSE similarity index 100% rename from other_project_defaults/LICENSE rename to LICENSE diff --git a/README.md b/README.md index a57f09c..6f2949a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # .github *Default [community health files](https://help.github.com/en/github/building-a-strong-community/creating-a-default-community-health-file) for all of my open-source projects* + +## Template repositories + +- [template-iOS-macOS](https://github.com/jessesquires/template-iOS-macOS) for iOS and macOS projects diff --git a/other_project_defaults/IDETemplateMacros.plist b/other_project_defaults/IDETemplateMacros.plist deleted file mode 100644 index c969c79..0000000 --- a/other_project_defaults/IDETemplateMacros.plist +++ /dev/null @@ -1,19 +0,0 @@ - - - - -FILEHEADER - -// Created by Jesse Squires -// https://www.jessesquires.com -// -// Documentation -// https://jessesquires.github.io/PROJECT_NAME -// -// GitHub -// https://github.com/jessesquires/PROJECT_NAME -// -// Copyright © YEAR-present Jesse Squires -// - - diff --git a/other_project_defaults/README.md b/other_project_defaults/README.md deleted file mode 100644 index fd2b7ee..0000000 --- a/other_project_defaults/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Default Project Files - -This directory contains miscellaneous default project files, like build scripts, etc. - -These must be copied to new repositories, and updated with project-specific details. - -## Contents - -### Scripts - -- `lint.sh`: run [SwiftLint](https://github.com/realm/SwiftLint). Add build phase script in Xcode project: `"${SRCROOT}/scripts/lint.sh"` - -- `build_docs.sh`: run [Jazzy](https://github.com/realm/jazzy) doc generation. - -### Templates - -- `IDETemplateMacros.plist` to [customize Xcode header comments](https://oleb.net/blog/2017/07/xcode-9-text-macros/). -Must be placed in either: - - `.xcodeproj/xcshareddata/IDETemplateMacros.plist` - - `.xcworkspace/xcshareddata/IDETemplateMacros.plist` - -## README template - -Boilerplate to add to `README.md` files. - -```markdown -## Contributing - -Interested in making contributions to this project? Please review the guides below. - -- [Contributing Guidelines](https://github.com/jessesquires/.github/blob/master/CONTRIBUTING.md) -- [Code of Conduct](https://github.com/jessesquires/.github/blob/master/CODE_OF_CONDUCT.md) -- [Support and Help](https://github.com/jessesquires/.github/blob/master/SUPPORT.md) -- [Security Policy](https://github.com/jessesquires/.github/blob/master/SECURITY.md) - -Also, consider [sponsoring this project](https://www.jessesquires.com/sponsor/) or [buying my apps](https://www.hexedbits.com)! ✌️ - -## Credits - -Created and maintained by [**@jesse_squires**](https://twitter.com/jesse_squires). - -## License - -Released under the MIT License. See `LICENSE` for details. - -> **Copyright © YEAR-present Jesse Squires.** -``` diff --git a/other_project_defaults/build_docs.sh b/other_project_defaults/build_docs.sh deleted file mode 100755 index 07a9e93..0000000 --- a/other_project_defaults/build_docs.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -# Created by Jesse Squires -# https://www.jessesquires.com -# -# Copyright © 2020-present Jesse Squires -# -# Docs by jazzy -# https://github.com/realm/jazzy -# ------------------------------ - -PROJECT="" - -if which jazzy >/dev/null; then - jazzy \ - --clean \ - --author "Jesse Squires" \ - --author_url "https://jessesquires.com" \ - --github_url "https://github.com/jessesquires/$PROJECT" \ - --module "$PROJECT" \ - --source-directory . \ - --readme "README.md" \ - --documentation "Guides/*.md" \ - --output docs/ - exit -else - echo " - Error: jazzy not installed! - Install: gem install jazzy - " - exit 1 -fi diff --git a/other_project_defaults/lint.sh b/other_project_defaults/lint.sh deleted file mode 100755 index ee1edea..0000000 --- a/other_project_defaults/lint.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -# Created by Jesse Squires -# https://www.jessesquires.com -# -# Copyright © 2020-present Jesse Squires -# https://github.com/jessesquires/.github -# -# SwiftLint -# https://github.com/realm/SwiftLint/releases/latest -# ------------------------------ - -VERSION="0.39.2" -FOUND=$(swiftlint version) - -if which swiftlint >/dev/null; then - swiftlint lint --config ./.swiftlint.yml - exit -else - echo " - Error: SwiftLint not installed! - Download from https://github.com/realm/SwiftLint, - or brew install swiftlint. - " -fi - -if [ $(swiftlint version) != $VERSION ]; then - echo " - Warning: incorrect SwiftLint installed! - Expected: $VERSION - Found: $FOUND - Download from https://github.com/realm/SwiftLint, - or brew upgrade swiftlint. - " -fi - -exit diff --git a/other_project_defaults/swiftlint.yml b/other_project_defaults/swiftlint.yml deleted file mode 100644 index 24aa28a..0000000 --- a/other_project_defaults/swiftlint.yml +++ /dev/null @@ -1,107 +0,0 @@ -excluded: - - Pods - - docs - - build - - scripts - -disabled_rules: - # metrics - - nesting - - # lint - - notification_center_detachment - - weak_delegate - - # idiomatic - - force_cast - - type_name - - # style - - identifier_name - -opt_in_rules: - # performance - - empty_count - - first_where - - sorted_first_last - - contains_over_first_not_nil - - last_where - - reduce_into - - contains_over_filter_count - - contains_over_filter_is_empty - - empty_collection_literal - - type_contents_order - - # idiomatic - - fatal_error_message - - xctfail_message - - discouraged_object_literal - - discouraged_optional_boolean - - discouraged_optional_collection - - for_where - - function_default_parameter_at_end - - legacy_random - - no_extension_access_modifier - - redundant_type_annotation - - static_operator - - toggle_bool - - unavailable_function - - no_space_in_method_call - - # style - - attributes - - number_separator - - operator_usage_whitespace - - sorted_imports - - vertical_parameter_alignment_on_call - - void_return - - closure_spacing - - empty_enum_arguments - - implicit_return - - modifier_order - - multiline_arguments - - multiline_parameters - - trailing_closure - - unneeded_parentheses_in_closure_argument - - vertical_whitespace_between_cases - - # lint - - overridden_super_call - - yoda_condition - - anyobject_protocol - - array_init - - empty_xctest_method - - identical_operands - - prohibited_super_call - - unused_import - - unused_capture_list - - duplicate_enum_cases - - legacy_multiple - - unused_declaration - -line_length: 200 -file_length: 600 - -type_body_length: 500 - -function_body_length: 250 - -cyclomatic_complexity: 15 - -type_contents_order: - order: - - associated_type - - type_alias - - case - - subtype - - type_property - - ib_outlet - - ib_inspectable - - instance_property - - initializer - - deinitializer - - subscript - - type_method - - view_life_cycle_method - - ib_action - - other_method