From 06818f92630889dadba7fe2a2200a1108ad85f24 Mon Sep 17 00:00:00 2001 From: Nick Brook Date: Tue, 4 Apr 2017 19:06:34 +0100 Subject: [PATCH 1/3] Scheme updates --- .../semver.xcodeproj/xcshareddata/xcschemes/semver-ios.xcscheme | 2 +- .../semver.xcodeproj/xcshareddata/xcschemes/semver-osx.xcscheme | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project/semver.xcodeproj/xcshareddata/xcschemes/semver-ios.xcscheme b/Project/semver.xcodeproj/xcshareddata/xcschemes/semver-ios.xcscheme index 16b41c7..8af132e 100644 --- a/Project/semver.xcodeproj/xcshareddata/xcschemes/semver-ios.xcscheme +++ b/Project/semver.xcodeproj/xcshareddata/xcschemes/semver-ios.xcscheme @@ -1,6 +1,6 @@ Date: Wed, 3 May 2017 18:20:28 +0100 Subject: [PATCH 2/3] Switched comment style to new Xcode style --- EDSemver/EDSemver.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/EDSemver/EDSemver.h b/EDSemver/EDSemver.h index 9c73e19..5fa7f7f 100644 --- a/EDSemver/EDSemver.h +++ b/EDSemver/EDSemver.h @@ -10,34 +10,34 @@ @interface EDSemver : NSObject -/*! +/** * The major version number (API changes) */ @property (readonly) NSInteger major; -/*! +/** * The minor version (functionality added in a backwards compatible manor) */ @property (readonly) NSInteger minor; -/*! +/** * The patch version (bug fixes made in a backwards compatible manor) */ @property (readonly) NSInteger patch; -/*! +/** * The prerelease number, preceded with -, e.g. 1.2.3-alpha1 */ @property (readonly, nullable) NSString *prerelease; -/*! +/** * The build number, preceded with +, e.g. 1.2.3+456 */ @property (readonly, nullable) NSString *build; -/*! +/** * The current semver spec version * * @return The spec version as a string */ + (nonnull NSString *)spec; -/*! +/** * Create a semver object with a version string * * @param aString The version string @@ -46,7 +46,7 @@ */ + (nonnull instancetype)semverWithString:(nonnull NSString *)aString; -/*! +/** * Create a semver object with a version string * * @param aString The version string @@ -55,7 +55,7 @@ */ - (nonnull instancetype)initWithString:(nonnull NSString *)aString; -/*! +/** * Compare semver objects * * @param aVersion The version string @@ -63,7 +63,7 @@ * @return The semver object */ - (NSComparisonResult)compare:(nonnull EDSemver *)aVersion; -/*! +/** * Is version equal to another version * Implemented using `compare:`. Returns NO parameter is nil * @@ -72,7 +72,7 @@ * @return YES if equal, NO otherwise */ - (BOOL)isEqualTo:(nullable id)object; -/*! +/** * Is version less than another version. * Implemented using `compare:`. Returns NO parameter is nil * @@ -81,7 +81,7 @@ * @return YES if less than, NO otherwise */ - (BOOL)isLessThan:(nullable id)object; -/*! +/** * Is version greater than than another version. * Implemented using `compare:`. Returns NO parameter is nil * @@ -91,7 +91,7 @@ */ - (BOOL)isGreaterThan:(nullable id)object; -/*! +/** * Is the semver object valid? * * @return YES if valid, NO otherwise From 83a3aec27f375da8106de0b5f72f4cc56bbd267a Mon Sep 17 00:00:00 2001 From: Nick Brook Date: Sat, 6 May 2017 18:04:30 +0100 Subject: [PATCH 3/3] Further fixes to comment format --- EDSemver/EDSemver.h | 92 +++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 44 deletions(-) diff --git a/EDSemver/EDSemver.h b/EDSemver/EDSemver.h index 5fa7f7f..056a9dd 100644 --- a/EDSemver/EDSemver.h +++ b/EDSemver/EDSemver.h @@ -8,93 +8,97 @@ #import + +/** + Semantic versioning conforming to [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html) + */ @interface EDSemver : NSObject /** - * The major version number (API changes) + The major version number (API changes) */ @property (readonly) NSInteger major; /** - * The minor version (functionality added in a backwards compatible manor) + The minor version (functionality added in a backwards compatible manor) */ @property (readonly) NSInteger minor; /** - * The patch version (bug fixes made in a backwards compatible manor) + The patch version (bug fixes made in a backwards compatible manor) */ @property (readonly) NSInteger patch; /** - * The prerelease number, preceded with -, e.g. 1.2.3-alpha1 + The prerelease number, preceded with -, e.g. 1.2.3-alpha1 */ @property (readonly, nullable) NSString *prerelease; /** - * The build number, preceded with +, e.g. 1.2.3+456 + The build number, preceded with +, e.g. 1.2.3+456 */ @property (readonly, nullable) NSString *build; /** - * The current semver spec version - * - * @return The spec version as a string + The current semver spec version + + @return The spec version as a string */ + (nonnull NSString *)spec; /** - * Create a semver object with a version string - * - * @param aString The version string - * - * @return The semver object + Create a semver object with a version string + + @param aString The version string + + @return The semver object */ + (nonnull instancetype)semverWithString:(nonnull NSString *)aString; /** - * Create a semver object with a version string - * - * @param aString The version string - * - * @return The semver object + Create a semver object with a version string + + @param aString The version string + + @return The semver object */ - (nonnull instancetype)initWithString:(nonnull NSString *)aString; /** - * Compare semver objects - * - * @param aVersion The version string - * - * @return The semver object + Compare semver objects + + @param aVersion The version string + + @return The semver object */ - (NSComparisonResult)compare:(nonnull EDSemver *)aVersion; /** - * Is version equal to another version - * Implemented using `compare:`. Returns NO parameter is nil - * - * @param object Another version - * - * @return YES if equal, NO otherwise + Is version equal to another version + Implemented using `compare:`. Returns `NO` if parameter is `nil` + + @param object Another version + + @return `YES` if equal, `NO` otherwise */ - (BOOL)isEqualTo:(nullable id)object; /** - * Is version less than another version. - * Implemented using `compare:`. Returns NO parameter is nil - * - * @param object Another version - * - * @return YES if less than, NO otherwise + Is version less than another version. + Implemented using `compare:`. Returns `NO` if parameter is `nil` + + @param object Another version + + @return `YES` if less than, `NO` otherwise */ - (BOOL)isLessThan:(nullable id)object; /** - * Is version greater than than another version. - * Implemented using `compare:`. Returns NO parameter is nil - * - * @param object Another version - * - * @return YES if greater than, NO otherwise + Is version greater than than another version. + Implemented using `compare:`. Returns `NO` if parameter is `nil` + + @param object Another version + + @return `YES` if greater than, `NO` otherwise */ - (BOOL)isGreaterThan:(nullable id)object; /** - * Is the semver object valid? - * - * @return YES if valid, NO otherwise + Is the semver object valid? + + @return `YES` if valid, `NO` otherwise */ - (BOOL)isValid;