Home

Awesome

Contributing

Guidelines for contributing to any PerformanC project.

Table of Contents

Security Policy

To ensure proper security of all PerformanC projects, please follow the Security Policy, documenting the security guidelines and procedures.

Code of Conduct

Any PerformanC contributor must follow the Code of Conduct, allowing better communication and collaboration between the community.

Syntax

To keep a consistent style, there are rules to follow when writing code. They are not enforced by any tool, but they are enforced by the community. If you have any questions or concerns, please contact The PerformanC Organization.

Project information

PerformanC projects are divided into three categories:

[!NOTE] The PerformanC Organization is constantly working on improving the standards, and assuring that all projects are following them.

General

JavaScript / TypeScript (Node.js)


import { foo2 } from 'bar'

function foo(value) {
  const firstLetter = value[0]
  let lastLetter = value[value.length - 1]
  lastLetter = lastLetter === '!' ? '?' : lastLetter

  if (firstLetter === 'n') return;

  return `${firstLetter.toUpperCase()}${value.slice(1, -1)}${lastLetter}`
}

console.log(foo('yes!'))
console.log(foo('no'))

[!NOTE] The code above is only an example of the syntax, it is not a good example of code as doesn't make sense.

C

#include <stdio.h>

void foo(int i) {
  if (i == 0) goto error;

  printf("Hello, world!\n");

  return;

  error:
    printf("Error!\n");
}

int main(void) {
  int i = 11;
  int *i_ptr = &i;

  printf("Hello, world! %p\n", i_ptr);

  foo(0);

  return 0;
}

Dart

/* Same code as JavaScript */
import 'package:bar/bar.dart';

String foo(String value) {
  const firstLetter = value[0];
  final lastLetter = value[value.length - 1];
  lastLetter = lastLetter == '!' ? '?' : lastLetter;

  if (firstLetter == 'n') return;

  return '${firstLetter.toUpperCase()}${value.substring(1, value.length - 1)}$lastLetter';
}

void main() {
  final foo = Foo();

  print(foo('yes!'));
  print(foo('no'));
}

HTML, CSS, and JavaScript (Web)

<!DOCTYPE html>
<html>
  <head>
    <title>Hello, world!</title>
  </head>
  <body>
    <h1>Hello, world!</h1>
  </body>
</html>

Commit Messages

add | update | remove | fix | improve | merge: short description (#PR merged)

Full description of the commit.

Co-authored-by: name <email> (optional)

[!NOTE] A project maintainer may change the commit message if it does not follow the guidelines.

Issues

Issues are used to track bugs, feature requests, and more. Please follow the guidelines below when creating an issue.

Pull Requests

Pull requests are used to contribute to the project. Please follow the guidelines below when creating a pull request.