Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 00e4dbd184a8eecfc8921431fcd1ecc2f966177e authored by Sanmisan on 13 October 2023, 20:18:23 UTC, committed by GitHub on 13 October 2023, 20:18:23 UTC
Update README.md
teaser img
1 parent b49b4e1
  • Files
  • Changes
  • ba30466
  • /
  • src
  • /
  • components
  • /
  • linterReport
  • /
  • hardRule.js
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:00e4dbd184a8eecfc8921431fcd1ecc2f966177e
directory badge
swh:1:dir:3a6001675a60a09dd3a2e8557c76d115d49d2e22
content badge
swh:1:cnt:28cf16d1b81bd32566862e0acd25f44e51dd845c

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
hardRule.js
import React, {Component} from "react";
import "../../styles/LinterReport.css"
import {Card, Alert, Button, Divider, Row, Col, Image} from 'antd';
import arrow from "../../resource/arrow.png";

class HardRulePanel extends Component {

    render(){
        let hasHardRuleViolation = this.props.hasHardRuleViolation;
        let hardRuleMsg = this.props.hardRuleMsg;
        //console.log(hardRuleMsg);
        if(!hasHardRuleViolation){
            return(
                <Alert
                    message="No hard rule violations"
                    type="success"
                    style={{marginBottom: 8}}
                    showIcon
                    closable
                />
            );
        }else{
            return(
                <Card
                title='Hard rule violations are detected'
                size='small'
                className='hardRuleCard'
                style={{marginBottom: 5}}
                extra={
                    <div
                        style={{
                            display: 'inline-block',
                            height: 40,
                            fontSize: 12
                        }}
                    >
                        <Button
                         size="small" 
                         danger
                         style={{
                            float:'left',
                            marginTop: 7,
                            marginRight: 5
                        }}
                        onClick={this.props.onHardRuleFixClick}
                        >
                            Fix
                        </Button>
                    </div>
                }
              >
                  {/** Card Content */}
                  {hardRuleMsg.map((msg,i)=>{
                      return (
                        <Card.Grid hoverable={false} className='cardGrid' key={i}>
                            <Row gutter={[5,5]}>
                                <Col span={24}><b>{msg.title}</b>{msg.text}</Col>
                                <Col span={24}>
                                    <Row>
                                        <Col span={1}>
                                            <Image
                                                width={15}
                                                src={arrow}
                                                preview={false}
                                                style={{marginLeft: 5}}
                                            />
                                        </Col>
                                        <Col span={23}>
                                            <b>Fix suggestion: </b>{msg.fixSuggestion}
                                        </Col>
                                    </Row>
                                </Col>
                            </Row>
                            <Divider 
                                style={{
                                    marginTop: 8,
                                    marginBottom: 0
                                }}
                            />
                        </Card.Grid>
                      )
                  })}
              </Card>
            );
        }
    }
}
export default HardRulePanel;
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API