Giter Site home page Giter Site logo

whoyoung / spacecommander Goto Github PK

View Code? Open in Web Editor NEW

This project forked from square/spacecommander

8.0 3.0 2.0 5.15 MB

Format and Commit Objective-C files automatically. Without copying commands manually.

License: Other

Objective-C 48.03% Ruby 1.57% Python 24.67% Shell 25.72%

spacecommander's Introduction

[ Space Commander]

中文说明点这里

[ Space Commander] provides tools which enable a team of iOS developers to commit Objective-C code to a git repository using a unified style format, without requiring any manual fixup.

This branch is forked from square/spacecommander. I modified [setup-repo.sh] and [format-objc-hook], to make these functions come true :

  1. automatic format and submit without copying commands to format codes manually.
  2. change the way to enable or disable format files

Installation Locally

  1. clone or download this repository to your mac. The spaceCommanderPath, for example: /Users/young/Documents/iOS/spacecommander-whoyoung.
  2. cd "your target project's path" in terminal. For example: cd /Users/young/Documents/iOS/testClangFormat. Then run the command (notice: the path should be replaced by your spacecommander's path): "/Users/young/Documents/iOS/spacecommander-whoyoung"/setup-repo.sh

Usage

After running setup-repo.sh, modifying your project files, clicking sourcetree's button - "submit", then, formatting checks and commit will run automatically.

Acquiescently, format and submit automatically. If you want disable format automatically, just open [pre-commit]: vim /Users/young/Documents/iOS/testClangFormat/.git/hooks/pre-commit (notice: the path should be replaced by your project's path), modify script like this:

#!/usr/bin/env bash
current_repo_path=$(git rev-parse --show-toplevel)
repo_to_format="/Users/young/Documents/iOS/testClangFormat"

#enable auto-format
#if [ "$current_repo_path" == "$repo_to_format" ] && [ -e "/Users/young/Documents/ios/spacecommander-whoyoung"/format-objc-hook ]; then "/Users/young/Documents/ios/spacecommander-whoyoung"/format-objc-hook || exit 1; fi

#disable auto-format
if [ "$current_repo_path" == "$repo_to_format" ] && [ -e "/Users/young/Documents/ios/spacecommander-whoyoung"/format-objc-hook ]; then "/Users/young/Documents/ios/spacecommander-whoyoung"/format-objc-hook -false || exit 1; fi

More Details

For more details, please references main repository spacecommander

spacecommander's People

Contributors

alanf avatar segiddins avatar whoyoung avatar ksuther avatar rhgills avatar jamieq avatar garrefa avatar addoshi avatar ericmuller22 avatar dfed avatar notjosh avatar justinseanmartin avatar mikesilvis avatar emablekos avatar

Stargazers

 avatar xueqifei avatar treebug avatar Tony avatar VanJay avatar Xi Lin avatar Artillery avatar bluesky avatar

Watchers

James Cloos avatar treebug avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.