Skip to content

Commit

Permalink
testing ci cd
Browse files Browse the repository at this point in the history
  • Loading branch information
madhuredra committed Sep 23, 2023
1 parent c6aa21c commit 5f72e36
Show file tree
Hide file tree
Showing 5 changed files with 201 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/javaBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
- uses: actions/checkout@v4
- uses: DoozyX/clang-format-lint-action@v0.16.2
with:
source: '../Java'
source: './Java'
extensions: 'java'
clangFormatVersion: 16
136 changes: 136 additions & 0 deletions Java/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
---
Language: Java
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: false
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 300
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
- Regex: '.*'
Priority: 1
SortPriority: 0
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertNewlineAtEOF: true
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
...
Empty file removed Java/.gitkeep
Empty file.
63 changes: 63 additions & 0 deletions Java/Classes/OOPs.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// Defining the OOPs class
/**
*
* In Object-Oriented Programming (OOP), classes are used to define blueprints
* or templates for creating objects. Objects, in turn, are instances of classes
* and encapsulate both data (attributes or fields) and behavior (methods or
* functions). Java is a popular programming language that fully supports OOP
* principles, and you can create your own classes in Java to model and structure
* your programs.
*
*/
public class OOPs {
// Attributes (data members)
private String language;
private int year;

// Constructor to initialize attributes
public OOPs(String language, int year) {
this.language = language;
this.year = year;
}

// Method to display information about the OOPs language
public void displayInfo() {
System.out.println("Language: " + language);
System.out.println("Year of Introduction: " + year);
}

// Getter method for the language attribute
public String getLanguage() {
return language;
}

// Setter method for the language attribute
public void setLanguage(String language) {
this.language = language;
}

// Getter method for the year attribute
public int getYear() {
return year;
}

// Setter method for the year attribute
public void setYear(int year) {
this.year = year;
}

// Main method to demonstrate the OOPs class
public static void main(String[] args) {
// Create an instance of the OOPs class
OOPs oopsLanguage = new OOPs("Java", 1995);

// Display information about the OOPs language
oopsLanguage.displayInfo();

// Update the year attribute
oopsLanguage.setYear(1996);

// Display the updated information
oopsLanguage.displayInfo();
}
}
2 changes: 1 addition & 1 deletion JavaScript/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
. "OOPs/$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/_/husky.sh"

npm run style
npm run test-changed

0 comments on commit 5f72e36

Please sign in to comment.