Skip to content

Files

Latest commit

 

History

History
67 lines (38 loc) · 778 Bytes

strict_fileprivate.md

File metadata and controls

67 lines (38 loc) · 778 Bytes

Pattern: Use of fileprivate

Issue: -

Description

fileprivate should be avoided.

Examples of correct code:

extension String {}


private extension String {}


public 
 extension String {}


open extension 
 String {}


internal extension String {}

Examples of incorrect code:

fileprivate extension String {}


fileprivate 
 extension String {}


fileprivate extension 
 String {}


extension String {fileprivate func Something(){}
}


class MyClass {fileprivate let myInt = 4
}


class MyClass {fileprivate(set) var myInt = 4
}


struct Outter {
struct Inter {fileprivate struct Inner {}
}
}

Further Reading